diff options
| author | Federico Tedin | 2019-12-05 10:30:17 +0100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-12-05 10:30:28 +0100 |
| commit | 3586fef263ccf3b68cc1289d55ef44a3d9ac7e1d (patch) | |
| tree | 9afa19b840fbef8fc61a3efbc4e148904195596c /doc | |
| parent | 9027084793831031926c12d3bdfa132ec6ac4e60 (diff) | |
| download | emacs-3586fef263ccf3b68cc1289d55ef44a3d9ac7e1d.tar.gz emacs-3586fef263ccf3b68cc1289d55ef44a3d9ac7e1d.zip | |
Make HIST arg of read-from-minibuffer work with buffer-local vars
* lisp/simple.el (minibuffer-history-values): New function, should be
used to access the minibuffer input history variable when the
minibuffer might be active. If the variable is buffer-local, the
previous buffer's value will be used.
(goto-history-element): Use the new function to access the minibuffer
history.
(minibuffer-history-isearch-wrap): Use the new function to access the
minibuffer history.
* src/minibuf.c (read_minibuf): Switch to previous buffer temporarily
before updating history list (Bug#38317).
(read-from-minibuffer): Extend documentation to mention that the
result of using the command will be added to the history list by
default.
* doc/lispref/minibuf.texi (Minibuffer History): Mention the
possibility of using a buffer-local variable as history.
* etc/NEWS: Announce changes.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/minibuf.texi | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index 4a218fe7378..dde30ce67f7 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi | |||
| @@ -547,7 +547,8 @@ to the minibuffer input function (@pxref{Initial Input}). | |||
| 547 | If you don't specify @var{history}, then the default history list | 547 | If you don't specify @var{history}, then the default history list |
| 548 | @code{minibuffer-history} is used. For other standard history lists, | 548 | @code{minibuffer-history} is used. For other standard history lists, |
| 549 | see below. You can also create your own history list variable; just | 549 | see below. You can also create your own history list variable; just |
| 550 | initialize it to @code{nil} before the first use. | 550 | initialize it to @code{nil} before the first use. If the variable is |
| 551 | buffer local, then each buffer will have its own input history list. | ||
| 551 | 552 | ||
| 552 | Both @code{read-from-minibuffer} and @code{completing-read} add new | 553 | Both @code{read-from-minibuffer} and @code{completing-read} add new |
| 553 | elements to the history list automatically, and provide commands to | 554 | elements to the history list automatically, and provide commands to |