GNU bug report logs -
#38026
[PATCH] Explain negative NABS in `goto-history-element'.
Previous Next
Reported by: Hong Xu <hong <at> topbug.net>
Date: Sat, 2 Nov 2019 01:09:01 UTC
Severity: minor
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Sat, 09 Nov 2019 11:46:04 +0200
with message-id <838sop9ycj.fsf <at> gnu.org>
and subject line Re: bug#38026: [PATCH] Explain negative NABS in `goto-history-element'.
has caused the debbugs.gnu.org bug report #38026,
regarding [PATCH] Explain negative NABS in `goto-history-element'.
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
38026: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=38026
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
* doc/lispref/minibuf.texi (Minibuffer Commands): Explain negative NABS.
* lisp/simple.el (goto-history-element): Explain negative NABS.
---
doc/lispref/minibuf.texi | 5 +++++
lisp/simple.el | 7 ++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index d36babd69873..a9bb3aec9583 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -2339,6 +2339,11 @@ Minibuffer Commands
minibuffer. The argument @var{nabs} specifies the absolute history
position in descending order, where 0 means the current element and a
positive number @var{n} means the @var{n}th previous element.
+
+@{nabs} being a negative number @var{n} means the @var{n-1}th element
+of @code{minibuffer-default} if it is a list, or otherwise the value
+of @code{minibuffer-default}. This is usually an intelligent guess of
+what the user intends to input."
@end deffn
@node Minibuffer Windows
diff --git a/lisp/simple.el b/lisp/simple.el
index 10aecd651f39..e95e2bc22972 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2130,7 +2130,12 @@ goto-history-element
"Puts element of the minibuffer history in the minibuffer.
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."
+positive number N means the Nth previous element.
+
+NABS being a negative number N means the (N-1)th element of
+`minibuffer-default' if it is a list, or otherwise the value of
+`minibuffer-default'. This is usually an intelligent guess of
+what the user intends to input."
(interactive "p")
(when (and (not minibuffer-default-add-done)
(functionp minibuffer-default-add-function)
--
2.20.1
[Message part 3 (message/rfc822, inline)]
> Cc: 38026 <at> debbugs.gnu.org
> From: Hong Xu <hong <at> topbug.net>
> Date: Sat, 2 Nov 2019 22:11:53 -0700
>
> > So I think the text needs not reference minibuffer-default, but
> > instead talk about "future history", like the Emacs manual does.
> >
>
> Thanks. Sounds like a good idea. I've attached an update.
Thanks, I pushed this, but please see how I fixed the log message, and
also the additional fixes in my following commit. In particular,
please always mention the bug number in the commit log message.
This bug report was last modified 5 years and 251 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.