diff options
| author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-03-16 02:39:27 +0100 | 
|---|---|---|
| committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-03-16 02:39:27 +0100 | 
| commit | bf174c102bb46362c78d079eaccbc14f3581d0c6 (patch) | |
| tree | af42e57d48853c94b684b0ebd93e3bbcc1e4a27e | |
| parent | 72cb97ef0f77b79bc94bed06cf3c5ea3f40f99ff (diff) | |
| download | geiser-bf174c102bb46362c78d079eaccbc14f3581d0c6.tar.gz geiser-bf174c102bb46362c78d079eaccbc14f3581d0c6.tar.bz2 | |
Segregate REPL history files by implementation.
| -rw-r--r-- | elisp/geiser-repl.el | 12 | 
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) | 
