diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-05 02:57:15 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-05 02:57:15 +0100 |
commit | b8992fe0b5ab24c66f9d58f61ed9d52ea378d4bf (patch) | |
tree | 759275353013098a1faace882cd99674d77f0633 /elisp/geiser-repl.el | |
parent | 95968c5dff4c8128a377d241436b6454c31c2e69 (diff) | |
download | geiser-guile-b8992fe0b5ab24c66f9d58f61ed9d52ea378d4bf.tar.gz geiser-guile-b8992fe0b5ab24c66f9d58f61ed9d52ea378d4bf.tar.bz2 |
Fix for TAB in REPL, and BACKTAB going to previous error
Diffstat (limited to 'elisp/geiser-repl.el')
-rw-r--r-- | elisp/geiser-repl.el | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index 57111f4..b84613b 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -505,11 +505,19 @@ With a prefix argument, force exit by killing the scheme process." (insert "\n")))))) (defun geiser-repl--tab (n) + "If we're after the last prompt, complete symbol or indent (if +there's no symbol at point). Otherwise, go to next error in the REPL +buffer." (interactive "p") (if (> (point) (geiser-repl--last-prompt-end)) (geiser-completion--maybe-complete) (compilation-next-error n))) +(defun geiser-repl--previous-error (n) + "Go to previous error in the REPL buffer." + (interactive "p") + (compilation-next-error (- n))) + (define-derived-mode geiser-repl-mode comint-mode "REPL" "Major mode for interacting with an inferior scheme repl process. \\{geiser-repl-mode-map}" @@ -535,13 +543,14 @@ With a prefix argument, force exit by killing the scheme process." (define-key geiser-repl-mode-map [return] 'geiser-repl--maybe-send) (define-key geiser-repl-mode-map "\C-j" 'geiser-repl--newline-and-indent) (define-key geiser-repl-mode-map (kbd "TAB") 'geiser-repl--tab) +(define-key geiser-repl-mode-map [backtab] 'geiser-repl--previous-error) (define-key geiser-repl-mode-map "\C-a" 'geiser-repl--bol) (define-key geiser-repl-mode-map (kbd "<home>") 'geiser-repl--bol) (geiser-menu--defmenu repl geiser-repl-mode-map - ("Complete symbol" ((kbd "TAB") (kbd "M-TAB")) - geiser-completion--complete-symbol :enable (symbol-at-point)) + ("Complete symbol" ((kbd "M-TAB")) + geiser-repl--tab :enable (symbol-at-point)) ("Complete module name" ((kbd "C-.") (kbd "M-`")) geiser-completion--complete-module :enable (symbol-at-point)) ("Edit symbol" "\M-." geiser-edit-symbol-at-point |