diff options
author | Alex Kost <alezost@gmail.com> | 2015-09-06 18:05:24 +0300 |
---|---|---|
committer | Alex Kost <alezost@gmail.com> | 2015-09-06 18:05:24 +0300 |
commit | 9356155e725ef185a211cf577126aca421a2a708 (patch) | |
tree | 82162c7d0096b6b81d50caa490755ed2e695f1cb /elisp/geiser-repl.el | |
parent | bd42523b61ff81dae4bf585fc2fabda4a94d8bd3 (diff) | |
download | geiser-guile-9356155e725ef185a211cf577126aca421a2a708.tar.gz geiser-guile-9356155e725ef185a211cf577126aca421a2a708.tar.bz2 |
repl: Add 'save-history' argument to 'geiser-repl--send'
Diffstat (limited to 'elisp/geiser-repl.el')
-rw-r--r-- | elisp/geiser-repl.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index 71385eb..57398fa 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -444,13 +444,17 @@ module command as a string") (geiser-autodoc--inhibit-autodoc) (geiser-con--connection-deactivate geiser-repl--connection)) -(defun geiser-repl--send (cmd) +(defun geiser-repl--send (cmd &optional save-history) + "Send CMD input string to the current REPL buffer. +If SAVE-HISTORY is non-nil, save CMD in the REPL history." (when (and cmd (eq major-mode 'geiser-repl-mode)) (geiser-repl--prepare-send) (goto-char (point-max)) (comint-kill-input) (insert cmd) - (let ((comint-input-filter (lambda (x) nil))) + (let ((comint-input-filter (if save-history + comint-input-filter + 'ignore))) (comint-send-input nil t)))) (defun geiser-repl-interrupt () |