#------------------------------------------------------------ #revno: 112736 #committer: Pete Beardmore #branch nick: bzr #timestamp: Mon 2013-05-27 07:53:30 +0100 #message: # comint: ensure buffer local comint-input-ring-read-size variable is visible throughout input-read-ring logic === modified file 'lisp/comint.el' --- lisp/comint.el 2013-05-25 02:40:33 +0000 +++ lisp/comint.el 2013-05-27 06:53:30 +0000 @@ -938,6 +938,7 @@ ;; to huge numbers. Don't allocate a huge ring right ;; away; there might not be that much history. (ring-size (min 1500 comint-input-ring-size)) + (ring-size-max (max 1500 comint-input-ring-size)) (ring (make-ring ring-size))) (with-temp-buffer (insert-file-contents file) @@ -945,7 +946,7 @@ ;; Watch for those date stamps in history files! (goto-char (point-max)) (let (start end history) - (while (and (< count comint-input-ring-size) + (while (and (< count ring-size-max) (re-search-backward comint-input-ring-separator nil t) (setq end (match-beginning 0))) @@ -963,7 +964,7 @@ (not (string-equal (ring-ref ring 0) history)))) (when (= count ring-size) - (ring-extend ring (min (- comint-input-ring-size ring-size) + (ring-extend ring (min (- ring-size-max ring-size) ring-size)) (setq ring-size (ring-size ring))) (ring-insert-at-beginning ring history)