summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 ()