From a36fd73dbd98a31fb955f5570afc307e3fc0cbf9 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sun, 11 Nov 2012 16:58:07 +0100 Subject: 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. --- elisp/geiser-repl.el | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'elisp/geiser-repl.el') 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 "") '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))) -- cgit v1.2.3