From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Hong Xu Newsgroups: gmane.emacs.bugs Subject: bug#37948: [PATCH] Add doc for goto-history-element. Date: Sun, 27 Oct 2019 13:48:28 -0700 Message-ID: <87sgnd6her.fsf@topbug.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="157320"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: 37948@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 27 21:52:10 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iOpWE-000eq2-9j for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Oct 2019 21:52:10 +0100 Original-Received: from localhost ([::1]:49498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOpWC-0000oF-V2 for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Oct 2019 16:52:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55559) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOpW7-0000o5-1M for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 16:52:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOpW6-0007YN-0H for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 16:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34768) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iOpW5-0007YH-Ta for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 16:52:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iOpW5-0002sl-RI for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 16:52:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Hong Xu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Oct 2019 20:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37948 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157220951411059 (code B ref -1); Sun, 27 Oct 2019 20:52:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Oct 2019 20:51:54 +0000 Original-Received: from localhost ([127.0.0.1]:43589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOpVx-0002sJ-Rm for submit@debbugs.gnu.org; Sun, 27 Oct 2019 16:51:54 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:56629) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iOpVw-0002sC-7R for submit@debbugs.gnu.org; Sun, 27 Oct 2019 16:51:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55542) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOpVu-0000mq-Vr for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 16:51:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOpVs-0007RS-Tq for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 16:51:50 -0400 Original-Received: from sender4-of-o54.zoho.com ([136.143.188.54]:21432) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOpVs-0007PX-7W for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2019 16:51:48 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1572209502; cv=none; d=zohomail.com; s=zohoarc; b=aN3TxGr/7Iam/gGbHwmUMU+Q9D4JVHJ6m1yNsZJdFd1AGPjAiP9tJ5Dvibl9XcJgP66yySmvSCM8z+/xrgsZETqxiwm5p3RAq8Chrd1PP2yFaAOzw1B6DxqZE1zqkoPBoVY+2jxwh1cRcdR9krKHqq2KHM83RlWSdssQZDR5qTQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1572209502; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=zIblUJLPbUaNO0/88+JIJbM/o0RP8j0XX9lXv1swUM8=; b=HSYPLjks+KXgR2DG87jAUK5DN9NOgLqlunuj51KxRCz1Iz2ng+ArnN2bDF0PmR0EG9mWIwvqn5QEcuHI28yDLCDhDR6/V3SE77c86yXS6HBA/hs/w/0OvVBdyWfwkAPgysFpIh65dq2eZz2ZLd0MzDlQ0IQo0kccsP0KEqnn5+o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=topbug.net; spf=pass smtp.mailfrom=hong@topbug.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1572209502; s=zoho; d=topbug.net; i=hong@topbug.net; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; l=1543; bh=zIblUJLPbUaNO0/88+JIJbM/o0RP8j0XX9lXv1swUM8=; b=jUbgB/OkaYjrMQvLDLDIbUiPcMrYV1/JBOKTv19dlLdpS/ssiWdVq0LbQSHmfcBZ Mr/64G97mzz7cjKRGaEYby3WBtZNYMPjCemgE0KIH/Frj2F5WqIjHQiqIEZkL0ahinZ RRUlEXy7vUQwt0d+xzqzQGt1QglioY+favd8P0Hw= Original-Received: from home (69-215-149-151.lightspeed.sntcca.sbcglobal.net [69.215.149.151]) by mx.zohomail.com with SMTPS id 1572209501271510.77637317957806; Sun, 27 Oct 2019 13:51:41 -0700 (PDT) X-ZohoMailClient: External X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:170272 Archived-At: * 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