diff options
author | Jonas Rodrigues <jxonas@gmail.com> | 2012-11-09 18:20:32 -0200 |
---|---|---|
committer | Jonas Rodrigues <jxonas@gmail.com> | 2012-11-09 18:20:32 -0200 |
commit | a814cf43fa33f66cb2fca512084d7ac2b63ae62a (patch) | |
tree | 9798bd18ba1281b70f1ba650dde35082ba48be9f /elisp | |
parent | f5144a27494a1e83d658d400289ba104b050ffd3 (diff) | |
download | geiser-guile-a814cf43fa33f66cb2fca512084d7ac2b63ae62a.tar.gz geiser-guile-a814cf43fa33f66cb2fca512084d7ac2b63ae62a.tar.bz2 |
New function 'geiser-repl--clear-buffer'
Diffstat (limited to 'elisp')
-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)) |