aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-05-11 20:35:51 +0000
committerGerd Moellmann2000-05-11 20:35:51 +0000
commitcdc4401d66083864d61cbdf25f16d19287789205 (patch)
tree89fe27fd330face6d404c7554e19f9e91c42d0fa
parent578979ee4a1a54026a6f4a28586596c450bd6513 (diff)
downloademacs-cdc4401d66083864d61cbdf25f16d19287789205.tar.gz
emacs-cdc4401d66083864d61cbdf25f16d19287789205.zip
(comint-read-input-ring): Move reference to
comint-input-ring-size outside of the save-excursion. It was causing the default value to be the only one ever seen.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/comint.el11
2 files changed, 10 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f45a9ba06ba..5729927101b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12000-05-11 Gerd Moellmann <gerd@gnu.org> 12000-05-11 Gerd Moellmann <gerd@gnu.org>
2 2
3 * comint.el (comint-read-input-ring): Move reference to
4 comint-input-ring-size outside of the save-excursion. It was
5 causing the default value to be the only one ever seen.
6
3 * font-lock.el: Update copyright. Remove Simon Marshall's email 7 * font-lock.el: Update copyright. Remove Simon Marshall's email
4 address on request from him. 8 address on request from him.
5 9
diff --git a/lisp/comint.el b/lisp/comint.el
index 7084d77bd21..a08cd097c7a 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -762,10 +762,11 @@ See also `comint-input-ignoredups' and `comint-write-input-ring'."
762 (message "Cannot read history file %s" 762 (message "Cannot read history file %s"
763 comint-input-ring-file-name))) 763 comint-input-ring-file-name)))
764 (t 764 (t
765 (let ((history-buf (get-buffer-create " *temp*")) 765 (let* ((history-buf (get-buffer-create " *temp*"))
766 (file comint-input-ring-file-name) 766 (file comint-input-ring-file-name)
767 (count 0) 767 (count 0)
768 (ring (make-ring comint-input-ring-size))) 768 (size comint-input-ring-size)
769 (ring (make-ring size)))
769 (unwind-protect 770 (unwind-protect
770 (save-excursion 771 (save-excursion
771 (set-buffer history-buf) 772 (set-buffer history-buf)
@@ -775,7 +776,7 @@ See also `comint-input-ignoredups' and `comint-write-input-ring'."
775 ;; Save restriction in case file is already visited... 776 ;; Save restriction in case file is already visited...
776 ;; Watch for those date stamps in history files! 777 ;; Watch for those date stamps in history files!
777 (goto-char (point-max)) 778 (goto-char (point-max))
778 (while (and (< count comint-input-ring-size) 779 (while (and (< count size)
779 (re-search-backward "^[ \t]*\\([^#\n].*\\)[ \t]*$" 780 (re-search-backward "^[ \t]*\\([^#\n].*\\)[ \t]*$"
780 nil t)) 781 nil t))
781 (let (start end history) 782 (let (start end history)