unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37948: [PATCH] Add doc for goto-history-element.
@ 2019-10-27 20:48 Hong Xu
  2019-10-28 15:21 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Hong Xu @ 2019-10-27 20:48 UTC (permalink / raw)
  To: 37948


* lisp/simple.el (goto-history-element): Clarify NABS.

* doc/lispref/minibuf.texi (Minibuffer Commands): Add goto-history-element.
---
 doc/lispref/minibuf.texi | 6 ++++++
 lisp/simple.el           | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index dd51181db009..d5a160140532 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -2334,6 +2334,12 @@ Minibuffer Commands
 contents of the minibuffer before the point.
 @end deffn
 
+@deffn Command goto-history-element nabs
+Puts element of the minibuffer history in the minibuffer.  The
+argument @var{nabs} specifies the absolute history position in
+descending order, where 0 means the current element and a positive
+number N means the Nth previous element.
+@end deffn
 
 @node Minibuffer Windows
 @section Minibuffer Windows
diff --git a/lisp/simple.el b/lisp/simple.el
index 5502cd49aa42..fcd271527075 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2128,7 +2128,9 @@ minibuffer-default-add-completions
 
 (defun goto-history-element (nabs)
   "Puts element of the minibuffer history in the minibuffer.
-The argument NABS specifies the absolute history position."
+The argument NABS specifies the absolute history position in
+descending order, where 0 means the current element and a
+positive number N means the Nth previous element."
   (interactive "p")
   (when (and (not minibuffer-default-add-done)
 	     (functionp minibuffer-default-add-function)
-- 
2.20.1







^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#37948: [PATCH] Add doc for goto-history-element.
  2019-10-27 20:48 bug#37948: [PATCH] Add doc for goto-history-element Hong Xu
@ 2019-10-28 15:21 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-28 15:21 UTC (permalink / raw)
  To: Hong Xu; +Cc: 37948

Hong Xu <hong@topbug.net> writes:

> * lisp/simple.el (goto-history-element): Clarify NABS.
>
> * doc/lispref/minibuf.texi (Minibuffer Commands): Add goto-history-element.

Makes sense; I've now applied this to Emacs 27.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-28 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-27 20:48 bug#37948: [PATCH] Add doc for goto-history-element Hong Xu
2019-10-28 15:21 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).