summaryrefslogtreecommitdiff
path: root/elisp
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
commit067311a33f7044e0af8d042782e8b710317ef3db (patch)
tree2fedae909ab860e5bf92761f730654210f47433e /elisp
parent1764955b397b3bbab4d0440e3ec622fa59533b39 (diff)
downloadgeiser-067311a33f7044e0af8d042782e8b710317ef3db.tar.gz
geiser-067311a33f7044e0af8d042782e8b710317ef3db.tar.bz2
repl: Add 'save-history' argument to 'geiser-repl--send'
Diffstat (limited to 'elisp')
-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 ()