From cdc4401d66083864d61cbdf25f16d19287789205 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 11 May 2000 20:35:51 +0000 Subject: [PATCH] (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. --- lisp/ChangeLog | 4 ++++ lisp/comint.el | 11 ++++++----- 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 @@ 2000-05-11 Gerd Moellmann + * comint.el (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. + * font-lock.el: Update copyright. Remove Simon Marshall's email address on request from him. 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'." (message "Cannot read history file %s" comint-input-ring-file-name))) (t - (let ((history-buf (get-buffer-create " *temp*")) - (file comint-input-ring-file-name) - (count 0) - (ring (make-ring comint-input-ring-size))) + (let* ((history-buf (get-buffer-create " *temp*")) + (file comint-input-ring-file-name) + (count 0) + (size comint-input-ring-size) + (ring (make-ring size))) (unwind-protect (save-excursion (set-buffer history-buf) @@ -775,7 +776,7 @@ See also `comint-input-ignoredups' and `comint-write-input-ring'." ;; Save restriction in case file is already visited... ;; Watch for those date stamps in history files! (goto-char (point-max)) - (while (and (< count comint-input-ring-size) + (while (and (< count size) (re-search-backward "^[ \t]*\\([^#\n].*\\)[ \t]*$" nil t)) (let (start end history) -- 2.39.5