Merge branch 'master' of git://factorcode.org/git/factor

db4
Doug Coleman 2009-01-20 18:48:07 -06:00
commit 2df61fd78d
6 changed files with 30 additions and 14 deletions

View File

@ -75,6 +75,7 @@ beast.
- C-cz : switch to listener - C-cz : switch to listener
- C-co : cycle between code, tests and docs factor files - C-co : cycle between code, tests and docs factor files
- C-cs : switch to other factor buffer (M-x fuel-switch-to-buffer) - C-cs : switch to other factor buffer (M-x fuel-switch-to-buffer)
- C-cr : switch to listener and refresh all loaded vocabs
- C-x4s : switch to other factor buffer in other window - C-x4s : switch to other factor buffer in other window
- C-x5s : switch to other factor buffer in other frame - C-x5s : switch to other factor buffer in other frame
@ -86,7 +87,7 @@ beast.
- C-cC-ew : edit word (M-x fuel-edit-word-at-point) - C-cC-ew : edit word (M-x fuel-edit-word-at-point)
- C-cC-ed : edit word's doc (M-x fuel-edit-word-at-point) - C-cC-ed : edit word's doc (M-x fuel-edit-word-at-point)
- C-cr, C-cC-er : eval region - C-cC-er : eval region
- C-M-r, C-cC-ee : eval region, extending it to definition boundaries - C-M-r, C-cC-ee : eval region, extending it to definition boundaries
- C-M-x, C-cC-ex : eval definition around point - C-M-x, C-cC-ex : eval definition around point
- C-ck, C-cC-ek : run file - C-ck, C-cC-ek : run file
@ -110,6 +111,7 @@ beast.
- TAB : complete word at point - TAB : complete word at point
- M-. : edit word at point in Emacs - M-. : edit word at point in Emacs
- C-cr : refresh all loaded vocabs
- C-ca : toggle autodoc mode - C-ca : toggle autodoc mode
- C-cp : find words containing given substring (M-x fuel-apropos) - C-cp : find words containing given substring (M-x fuel-apropos)
- C-cs : toggle stack mode - C-cs : toggle stack mode

View File

@ -1,6 +1,6 @@
;;; fuel-debug.el -- debugging factor code ;;; fuel-debug.el -- debugging factor code
;; Copyright (C) 2008 Jose Antonio Ortega Ruiz ;; Copyright (C) 2008, 2009 Jose Antonio Ortega Ruiz
;; See http://factorcode.org/license.txt for BSD license. ;; See http://factorcode.org/license.txt for BSD license.
;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org> ;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
@ -287,7 +287,8 @@ the debugger."
(goto-char (point-min)) (goto-char (point-min))
(if (re-search-forward "^USING: " nil t) (if (re-search-forward "^USING: " nil t)
(let ((begin (point)) (let ((begin (point))
(end (or (and (re-search-forward "\\_<;\\_>") (point)) (point)))) (end (or (and (re-search-forward ";\\( \\|$\\)") (point))
(point))))
(kill-region begin end)) (kill-region begin end))
(re-search-forward "^IN: " nil t) (re-search-forward "^IN: " nil t)
(beginning-of-line) (beginning-of-line)

View File

@ -75,7 +75,7 @@
(defun fuel-font-lock--syntactic-face (state) (defun fuel-font-lock--syntactic-face (state)
(if (nth 3 state) 'factor-font-lock-string (if (nth 3 state) 'factor-font-lock-string
(let ((c (char-after (nth 8 state)))) (let ((c (char-after (nth 8 state))))
(cond ((char-equal c ?\ ) (cond ((or (char-equal c ?\ ) (char-equal c ?\n))
(save-excursion (save-excursion
(goto-char (nth 8 state)) (goto-char (nth 8 state))
(beginning-of-line) (beginning-of-line)

View File

@ -107,15 +107,9 @@ buffer."
(goto-char (point-max)) (goto-char (point-max))
(unless seen (error "No prompt found!")))) (unless seen (error "No prompt found!"))))
(defun fuel-listener-nuke ()
(interactive)
(goto-char (point-max))
(comint-kill-region comint-last-input-start (point))
(comint-redirect-cleanup)
(fuel-con--setup-connection fuel-listener--buffer))
;;; Interface: starting fuel listener ;;; Interface: starting and interacting with fuel listener:
(defalias 'switch-to-factor 'run-factor) (defalias 'switch-to-factor 'run-factor)
(defalias 'switch-to-fuel-listener 'run-factor) (defalias 'switch-to-fuel-listener 'run-factor)
@ -129,6 +123,23 @@ buffer."
(pop-to-buffer buf) (pop-to-buffer buf)
(switch-to-buffer buf)))) (switch-to-buffer buf))))
(defun fuel-listener-nuke ()
"Try this command if the listener becomes unresponsive."
(interactive)
(goto-char (point-max))
(comint-kill-region comint-last-input-start (point))
(comint-redirect-cleanup)
(fuel-con--setup-connection fuel-listener--buffer))
(defun fuel-refresh-all ()
"Switch to the listener buffer and invokes Factor's refresh-all.
With prefix, you're teletransported to the listener's buffer."
(interactive)
(let ((buf (process-buffer (fuel-listener--process))))
(pop-to-buffer buf)
(comint-send-string nil "\"Refreshing loaded vocabs...\" write nl flush")
(comint-send-string nil " refresh-all \"Done!\" write nl flush\n")))
;;; Completion support ;;; Completion support
@ -172,6 +183,7 @@ buffer."
(define-key fuel-listener-mode-map "\C-a" 'fuel-listener--bol) (define-key fuel-listener-mode-map "\C-a" 'fuel-listener--bol)
(define-key fuel-listener-mode-map "\C-ca" 'fuel-autodoc-mode) (define-key fuel-listener-mode-map "\C-ca" 'fuel-autodoc-mode)
(define-key fuel-listener-mode-map "\C-ch" 'fuel-help) (define-key fuel-listener-mode-map "\C-ch" 'fuel-help)
(define-key fuel-listener-mode-map "\C-cr" 'fuel-refresh-all)
(define-key fuel-listener-mode-map "\C-cs" 'fuel-stack-mode) (define-key fuel-listener-mode-map "\C-cs" 'fuel-stack-mode)
(define-key fuel-listener-mode-map "\C-cp" 'fuel-apropos) (define-key fuel-listener-mode-map "\C-cp" 'fuel-apropos)
(define-key fuel-listener-mode-map "\M-." 'fuel-edit-word-at-point) (define-key fuel-listener-mode-map "\M-." 'fuel-edit-word-at-point)

View File

@ -175,7 +175,7 @@ interacting with a factor listener is at your disposal.
(fuel-mode--key-1 ?k 'fuel-run-file) (fuel-mode--key-1 ?k 'fuel-run-file)
(fuel-mode--key-1 ?l 'fuel-run-file) (fuel-mode--key-1 ?l 'fuel-run-file)
(fuel-mode--key-1 ?r 'fuel-eval-region) (fuel-mode--key-1 ?r 'fuel-refresh-all)
(fuel-mode--key-1 ?z 'run-factor) (fuel-mode--key-1 ?z 'run-factor)
(fuel-mode--key-1 ?s 'fuel-switch-to-buffer) (fuel-mode--key-1 ?s 'fuel-switch-to-buffer)
(define-key fuel-mode-map "\C-x4s" 'fuel-switch-to-buffer-other-window) (define-key fuel-mode-map "\C-x4s" 'fuel-switch-to-buffer-other-window)

View File

@ -252,8 +252,9 @@
;; Multiline constructs ;; Multiline constructs
("\\_<\\(U\\)SING: \\(;\\)" (1 "<b") (2 ">b")) ("\\_<\\(U\\)SING: \\(;\\)" (1 "<b") (2 ">b"))
("\\_<USING:\\( \\)" (1 "<b")) ("\\_<USING:\\( \\)" (1 "<b"))
("\\_<TUPLE: +\\w+? +< +\\w+? *\\( \\)" (1 "<b")) ("\\_<TUPLE: +\\w+? +< +\\w+? *\\( \\|\n\\)\\([^;]\\|$\\)" (1 "<b"))
("\\_<\\(TUPLE\\|SYMBOLS\\|VARS\\): +\\w+? *\\( \\)\\([^<\n]\\|\\_>\\)" (2 "<b")) ("\\_<\\(TUPLE\\|SYMBOLS\\|VARS\\): +\\w+? *\\( \\|\n\\)\\([^;<\n]\\|\\_>\\)"
(2 "<b"))
("\\(\n\\| \\);\\_>" (1 ">b")) ("\\(\n\\| \\);\\_>" (1 ">b"))
;; Let and lambda: ;; Let and lambda:
("\\_<\\(!(\\) .* \\()\\)" (1 "<") (2 ">")) ("\\_<\\(!(\\) .* \\()\\)" (1 "<") (2 ">"))