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 | a36fd73dbd98a31fb955f5570afc307e3fc0cbf9 (patch) | |
tree | 8841f750409eb3fe0ad0eddccf7397ed58060b6b /elisp/geiser-repl.el | |
parent | a013b17d8f27de4ccec12e1fd2cf19f097684948 (diff) | |
download | geiser-a36fd73dbd98a31fb955f5570afc307e3fc0cbf9.tar.gz geiser-a36fd73dbd98a31fb955f5570afc307e3fc0cbf9.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/geiser-repl.el')
-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))) |