# HG changeset patch # User Karl Heuer # Date 928521977 0 # Node ID 4c57b458fa9b022a8557eee0a5ca3b5d6097e5ed # Parent f581efbf0cafff2aadf7a03cce502f80d884f294 (next-history-element): Handle minibuffer-text-before-history properly when reading sexps. diff -r f581efbf0caf -r 4c57b458fa9b lisp/simple.el --- a/lisp/simple.el Fri Jun 04 18:42:20 1999 +0000 +++ b/lisp/simple.el Fri Jun 04 18:46:17 1999 +0000 @@ -798,7 +798,7 @@ (or (zerop n) (let ((narg (- minibuffer-history-position n)) (minimum (if minibuffer-default -1 0)) - elt) + elt minibuffer-returned-to-present) (if (and (zerop minibuffer-history-position) (null minibuffer-text-before-history)) (setq minibuffer-text-before-history (buffer-string))) @@ -814,11 +814,13 @@ (setq elt minibuffer-default)) ((= narg 0) (setq elt (or minibuffer-text-before-history "")) + (setq minibuffer-returned-to-present t) (setq minibuffer-text-before-history nil)) (t (setq elt (nth (1- minibuffer-history-position) (symbol-value minibuffer-history-variable))))) (insert - (if (eq minibuffer-history-sexp-flag (minibuffer-depth)) + (if (and (eq minibuffer-history-sexp-flag (minibuffer-depth)) + (not minibuffer-returned-to-present)) (let ((print-level nil)) (prin1-to-string elt)) elt))