summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-16 02:39:27 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-16 02:39:27 +0100
commitbedcd027dced5111cc1a2fa91ba34c3d71b226d2 (patch)
treee7525110dc2e8f0bb1992634311db3e7704eb567 /elisp
parent8dcd0a4d874f1d51f33f1b8a993b6c4f7754abf6 (diff)
downloadgeiser-chez-bedcd027dced5111cc1a2fa91ba34c3d71b226d2.tar.gz
geiser-chez-bedcd027dced5111cc1a2fa91ba34c3d71b226d2.tar.bz2
Segregate REPL history files by implementation.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-repl.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index d4471b8..d0eddd5 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -54,7 +54,9 @@ REPL buffer."
:group 'geiser-repl)
(defcustom geiser-repl-history-filename (expand-file-name "~/.geiser_history")
- "File where REPL input history is saved, so that it persists between sessions."
+ "File where REPL input history is saved, so that it persists between sessions.
+This is actually the base name: the concrete Scheme
+implementation name gets appended to it."
:type 'filename
:group 'geiser-repl)
@@ -196,6 +198,9 @@ If no REPL is running, execute `run-geiser' to start a fresh one."
;;; REPL history and clean-up:
+(defsubst geiser-repl--history-file ()
+ (format "%s.%s" geiser-repl-history-filename geiser-impl--implementation))
+
(defun geiser-repl--on-quit ()
(comint-write-input-ring)
(let ((cb (current-buffer))
@@ -211,7 +216,7 @@ If no REPL is running, execute `run-geiser' to start a fresh one."
(when (string= event "finished\n")
(with-current-buffer (process-buffer proc)
(let ((comint-prompt-read-only nil)
- (comint-input-ring-file-name geiser-repl-history-filename))
+ (comint-input-ring-file-name (geiser-repl--history-file)))
(geiser-repl--on-quit)
(when (buffer-name (current-buffer))
(insert "\nIt's been nice interacting with you!\n")
@@ -222,7 +227,8 @@ If no REPL is running, execute `run-geiser' to start a fresh one."
(not (string-match "^,quit *$" str))))
(defun geiser-repl--history-setup ()
- (set (make-local-variable 'comint-input-ring-file-name) geiser-repl-history-filename)
+ (set (make-local-variable 'comint-input-ring-file-name)
+ (geiser-repl--history-file))
(set (make-local-variable 'comint-input-ring-size) geiser-repl-history-size)
(set (make-local-variable 'comint-input-filter) 'geiser-repl--input-filter)
(add-hook 'kill-buffer-hook 'geiser-repl--on-quit nil t)