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 | a013b17d8f27de4ccec12e1fd2cf19f097684948 (patch) | |
tree | ec84c35caa9387a2e02e3873a47b5752dc53586e /elisp | |
parent | 35676663d79dd1ce3408b34317377ba5478179a9 (diff) | |
download | geiser-a013b17d8f27de4ccec12e1fd2cf19f097684948.tar.gz geiser-a013b17d8f27de4ccec12e1fd2cf19f097684948.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)) |