diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-01-07 14:14:31 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2011-01-07 14:14:31 +0100 |
commit | 2ca4ad6e1385e2ea21f05f6760db0e0ff5cca4c3 (patch) | |
tree | c778fd0569daa3483ca05b9baafbd679b3369d5c /elisp/geiser-repl.el | |
parent | 7342870bfce4071673936597559ae60ffcba03b2 (diff) | |
download | geiser-chez-2ca4ad6e1385e2ea21f05f6760db0e0ff5cca4c3.tar.gz geiser-chez-2ca4ad6e1385e2ea21f05f6760db0e0ff5cca4c3.tar.bz2 |
REPL: fix for history navigation
We were using a comint-get-old-input function that was including the
prompt in its returned value. This was no problem most of the time
because we don't use comint-send-input before the process mark, but
there's another circumstance under which comint-get-old-input is
called, namely, when reaching the end of the input history. When
history is exhausted, the "old input" is inserted (go figure), and we
were inserting a prompt, wreaking havoc with its read-only-ness.
Diffstat (limited to 'elisp/geiser-repl.el')
-rw-r--r-- | elisp/geiser-repl.el | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index b9c47f5..8b37ca0 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -1,6 +1,6 @@ ;;; geiser-repl.el --- Geiser's REPL -;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2011 Jose Antonio Ortega Ruiz ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the Modified BSD License. You should @@ -399,7 +399,6 @@ module command as a string") (buffer-substring (point) end)))) (defun geiser-repl--quit-setup () - (set (make-local-variable 'comint-get-old-input) 'geiser-repl--old-input) (add-hook 'kill-buffer-hook 'geiser-repl--on-kill nil t) (set-process-sentinel (get-buffer-process (current-buffer)) 'geiser-repl--sentinel)) @@ -493,7 +492,7 @@ buffer." \\{geiser-repl-mode-map}" (scheme-mode-variables) (set (make-local-variable 'mode-line-process) nil) - (set (make-local-variable 'comint-use-prompt-regexp) nil) + (set (make-local-variable 'comint-use-prompt-regexp) t) (set (make-local-variable 'comint-prompt-read-only) geiser-repl-read-only-prompt-p) (set (make-local-variable 'beginning-of-defun-function) |