summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Kost <alezost@gmail.com>2015-09-06 18:05:24 +0300
committerAlex Kost <alezost@gmail.com>2015-09-06 18:05:24 +0300
commit9356155e725ef185a211cf577126aca421a2a708 (patch)
tree82162c7d0096b6b81d50caa490755ed2e695f1cb
parentbd42523b61ff81dae4bf585fc2fabda4a94d8bd3 (diff)
downloadgeiser-guile-9356155e725ef185a211cf577126aca421a2a708.tar.gz
geiser-guile-9356155e725ef185a211cf577126aca421a2a708.tar.bz2
repl: Add 'save-history' argument to 'geiser-repl--send'
-rw-r--r--elisp/geiser-repl.el8
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 ()