aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHong Xu2019-10-28 16:20:43 +0100
committerLars Ingebrigtsen2019-10-28 16:20:52 +0100
commit70578e077765825980d4dbffc0e1542f01df15ef (patch)
tree47d34dfc51a46cd7950fbf42bfd7bc9e600e972c
parent9ee2caac4ddf3e790216a0353debef65e4a12c80 (diff)
downloademacs-70578e077765825980d4dbffc0e1542f01df15ef.tar.gz
emacs-70578e077765825980d4dbffc0e1542f01df15ef.zip
Add doc for goto-history-element
* doc/lispref/minibuf.texi (Minibuffer Commands): Add goto-history-element (bug#37948). * lisp/simple.el (goto-history-element): Clarify NABS.
-rw-r--r--doc/lispref/minibuf.texi6
-rw-r--r--lisp/simple.el4
2 files changed, 9 insertions, 1 deletions
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index dd51181db00..d5a16014053 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -2334,6 +2334,12 @@ This command replaces the minibuffer contents with the value of the
2334contents of the minibuffer before the point. 2334contents of the minibuffer before the point.
2335@end deffn 2335@end deffn
2336 2336
2337@deffn Command goto-history-element nabs
2338Puts element of the minibuffer history in the minibuffer. The
2339argument @var{nabs} specifies the absolute history position in
2340descending order, where 0 means the current element and a positive
2341number N means the Nth previous element.
2342@end deffn
2337 2343
2338@node Minibuffer Windows 2344@node Minibuffer Windows
2339@section Minibuffer Windows 2345@section Minibuffer Windows
diff --git a/lisp/simple.el b/lisp/simple.el
index 184d4eccdb9..fca90690a5f 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2128,7 +2128,9 @@ the end of the list of defaults just after the default value."
2128 2128
2129(defun goto-history-element (nabs) 2129(defun goto-history-element (nabs)
2130 "Puts element of the minibuffer history in the minibuffer. 2130 "Puts element of the minibuffer history in the minibuffer.
2131The argument NABS specifies the absolute history position." 2131The argument NABS specifies the absolute history position in
2132descending order, where 0 means the current element and a
2133positive number N means the Nth previous element."
2132 (interactive "p") 2134 (interactive "p")
2133 (when (and (not minibuffer-default-add-done) 2135 (when (and (not minibuffer-default-add-done)
2134 (functionp minibuffer-default-add-function) 2136 (functionp minibuffer-default-add-function)