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 /elisp | |
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.
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-repl.el | 24 |
1 files changed, 10 insertions, 14 deletions
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))) |