mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-21 04:17:35 +00:00
(next-history-element):
Handle minibuffer-text-before-history properly when reading sexps.
This commit is contained in:
parent
3fbd8622f2
commit
068c712cc9
1 changed files with 4 additions and 2 deletions
|
|
@ -798,7 +798,7 @@ An uppercase letter in REGEXP makes the search case-sensitive."
|
|||
(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 @@ An uppercase letter in REGEXP makes the search case-sensitive."
|
|||
(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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue