diff options
Diffstat (limited to 'elisp/geiser-repl.el')
-rw-r--r-- | elisp/geiser-repl.el | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index d7be7cf..fd87d42 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -414,6 +414,18 @@ module command as a string") (geiser-repl--read-input-ring)) +;;; 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 () @@ -588,6 +600,8 @@ 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)) |