Thread: [pure-lang-svn] SF.net SVN: pure-lang: [221] pure/trunk/pure-mode.el.in
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-06-14 07:41:00
|
Revision: 221 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=221&view=rev Author: agraef Date: 2008-06-14 00:41:05 -0700 (Sat, 14 Jun 2008) Log Message: ----------- Suppress paging and sign-on message when running the Pure interpreter. Modified Paths: -------------- pure/trunk/pure-mode.el.in Modified: pure/trunk/pure-mode.el.in =================================================================== --- pure/trunk/pure-mode.el.in 2008-06-14 07:32:48 UTC (rev 220) +++ pure/trunk/pure-mode.el.in 2008-06-14 07:41:05 UTC (rev 221) @@ -597,8 +597,9 @@ (comint-read-input-ring t)))) (goto-char (point-max)) ;; invoke the interpreter + (setenv "PURE_MORE" nil) ; disable paging in the interpreter (comint-exec pure-eval-buffer "pure-eval" pure-prog-name nil - (append (list "-i") args)) + (append (list "-q" "-i") args)) ;; set up process parameters (setq pure-output-list nil pure-output-string nil This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-14 09:56:51
|
Revision: 226 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=226&view=rev Author: agraef Date: 2008-06-14 02:56:59 -0700 (Sat, 14 Jun 2008) Log Message: ----------- Add shebang fontification. Modified Paths: -------------- pure/trunk/pure-mode.el.in Modified: pure/trunk/pure-mode.el.in =================================================================== --- pure/trunk/pure-mode.el.in 2008-06-14 09:37:52 UTC (rev 225) +++ pure/trunk/pure-mode.el.in 2008-06-14 09:56:59 UTC (rev 226) @@ -172,6 +172,7 @@ (defvar pure-font-lock-keywords (list + (list "^#!.*" 0 'font-lock-comment-face t) (list "::\\([A-Za-z_][A-Za-z_0-9]*\\)" 1 'font-lock-type-face) (list (concat "\\<\\(" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ag...@us...> - 2008-06-14 20:58:28
|
Revision: 233 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=233&view=rev Author: agraef Date: 2008-06-14 13:58:03 -0700 (Sat, 14 Jun 2008) Log Message: ----------- Make completion work in Emacs mode. Modified Paths: -------------- pure/trunk/pure-mode.el.in Modified: pure/trunk/pure-mode.el.in =================================================================== --- pure/trunk/pure-mode.el.in 2008-06-14 20:10:24 UTC (rev 232) +++ pure/trunk/pure-mode.el.in 2008-06-14 20:58:03 UTC (rev 233) @@ -813,43 +813,36 @@ ;; completion -;; XXXFIXME: Currently this just calls the comint-dynamic-complete function, -;; as the Pure interpreter doesn't understand the completion_matches command -;; right now. - (defun pure-complete () "Perform completion on the token preceding point." (interactive) - (comint-dynamic-complete)) + (if (pure-at-command-prompt-p) + (let* ((end (point)) + (command + (save-excursion + ;; skip back one word/identifier or operator (punctuation) + (skip-syntax-backward "w_") + (and (eq (point) end) + (skip-syntax-backward ".")) + (and (looking-at pure-prompt-regexp) + (goto-char (match-end 0))) + (buffer-substring-no-properties (point) end)))) + (pure-send-list-and-digest + (list (concat "completion_matches " command "\n"))) + ;; Sort the list + (setq pure-output-list + (sort pure-output-list 'string-lessp)) + ;; Remove duplicates + (let* ((x pure-output-list) + (y (cdr x))) + (while y + (if (string-equal (car x) (car y)) + (setcdr x (setq y (cdr y))) + (setq x y + y (cdr y))))) + ;; And let comint handle the rest + (comint-dynamic-simple-complete command pure-output-list)))) -; (defun pure-complete () -; "Perform completion on the token preceding point." -; (interactive) -; (if (pure-at-command-prompt-p) -; (let* ((end (point)) -; (command -; (save-excursion -; ;; skip over anything but whitespace, quotes and parentheses -; (skip-syntax-backward "w_.\\$'<>") -; (and (looking-at pure-prompt-regexp) -; (goto-char (match-end 0))) -; (buffer-substring-no-properties (point) end)))) -; (pure-send-list-and-digest -; (list (concat "completion_matches \"" command "\"\n"))) -; ;; Sort the list -; (setq pure-output-list -; (sort pure-output-list 'string-lessp)) -; ;; Remove duplicates -; (let* ((x pure-output-list) -; (y (cdr x))) -; (while y -; (if (string-equal (car x) (car y)) -; (setcdr x (setq y (cdr y))) -; (setq x y -; y (cdr y))))) -; ;; And let comint handle the rest -; (comint-dynamic-simple-complete command pure-output-list)))) - ;; send commands to the Q interpreter and digest their results (defun pure-output-digest (proc string) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |