diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2012-11-11 16:58:07 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2012-11-11 16:58:07 +0100 |
commit | f6e0ac85012c2e46dff12e9ec0181c02b6074b8a (patch) | |
tree | 805f5597281c5cb83673a8c57e86200519cde990 | |
parent | a814cf43fa33f66cb2fca512084d7ac2b63ae62a (diff) | |
download | geiser-chez-f6e0ac85012c2e46dff12e9ec0181c02b6074b8a.tar.gz geiser-chez-f6e0ac85012c2e46dff12e9ec0181c02b6074b8a.tar.bz2 |
New command geiser-repl-clear-buffer
Just renamed geiser-repl--clear-buffer (we don't use -- when users can
call the command with M-x normally) and added documentation.
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | README | 1 | ||||
-rw-r--r-- | doc/cheat.texi | 3 | ||||
-rw-r--r-- | elisp/geiser-repl.el | 24 |
4 files changed, 16 insertions, 15 deletions
@@ -4,7 +4,8 @@ filename completion. - Indentation of scheme forms improved (specially for those of you using a single implementation). - + - New REPL command, geiser-repl-clear-buffer (C-c M-o), to remove + all scheme output (thanks to jxonas). * Version 0.2.2 (Sep 30, 2012) @@ -123,6 +123,7 @@ |-------------+----------------------------------------------------| | C-c C-z | Start Scheme REPL, or jump to previous buffer | + | C-c M-o | Clear scheme output | | C-c C-q | Kill Scheme process | | C-c C-k | Nuke REPL: use it if the REPL becomes unresponsive | |-------------+----------------------------------------------------| diff --git a/doc/cheat.texi b/doc/cheat.texi index 0d5403e..0522009 100644 --- a/doc/cheat.texi +++ b/doc/cheat.texi @@ -118,6 +118,9 @@ third key not modified by @key{Control}; e.g., @item C-c C-z @tab @code{switch-to-geiser} @tab Start Scheme REPL, or jump to previous buffer +@item C-c M-o +@tab @code{geiser-repl-clear-buffer} +@tab Clear REPL buffer @item C-c C-q @tab @code{geiser-repl-exit} @tab Kill Scheme process diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index fd87d42..1de94e3 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -416,18 +416,6 @@ module command as a string") ;;; Cleaning up -(defun geiser-repl--clear-buffer () - "Delete the output generated by the scheme process." - (interactive) - (let ((inhibit-read-only t)) - (delete-region (point-min) (geiser-repl--last-prompt-start)) - (when (< (point) (geiser-repl--last-prompt-end)) - (goto-char (geiser-repl--last-prompt-end))) - (recenter t))) - - -;;; Cleaning up on quit - (defun geiser-repl--on-quit () (geiser-repl--write-input-ring) (let ((cb (current-buffer)) @@ -567,6 +555,14 @@ buffer." (interactive "p") (compilation-next-error (- n))) +(defun geiser-repl-clear-buffer () + "Delete the output generated by the scheme process." + (interactive) + (let ((inhibit-read-only t)) + (delete-region (point-min) (geiser-repl--last-prompt-start)) + (when (< (point) (geiser-repl--last-prompt-end)) + (goto-char (geiser-repl--last-prompt-end))) + (recenter t))) (define-derived-mode geiser-repl-mode comint-mode "REPL" "Major mode for interacting with an inferior scheme repl process. @@ -600,8 +596,6 @@ buffer." (define-key geiser-repl-mode-map "\C-a" 'geiser-repl--bol) (define-key geiser-repl-mode-map (kbd "<home>") 'geiser-repl--bol) -(define-key geiser-repl-mode-map "\C-c\M-o" 'geiser-repl--clear-buffer) - (geiser-menu--defmenu repl geiser-repl-mode-map ("Complete symbol" ((kbd "M-TAB")) completion-at-point :enable (geiser--symbol-at-point)) @@ -631,6 +625,8 @@ buffer." ("Module documentation" ("\C-c\C-dm" "\C-c\C-d\C-m") geiser-repl--doc-module "Documentation for module at point" :enable (geiser--symbol-at-point)) -- + ("Clear buffer" "\C-c\M-o" geiser-repl-clear-buffer + "Clean up REPL buffer, leaving just a lonely prompt") ("Kill Scheme interpreter" "\C-c\C-q" geiser-repl-exit :enable (geiser-repl--live-p)) ("Restart" "\C-c\C-z" switch-to-geiser :enable (not (geiser-repl--live-p))) |