From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#30660: mention describe-bindings on (info "(emacs) Keymaps") Date: Thu, 17 Oct 2019 14:07:10 +0200 Message-ID: References: <831b5f34-28c7-4753-bed9-0a28de484aa8@default> <87tv8bul5g.fsf@gnus.org> <8336fvhxt0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="64826"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 30660@debbugs.gnu.org, Lars Ingebrigtsen , =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 17 14:09:53 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 1iL4bI-000Gfn-Aa for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Oct 2019 14:09:52 +0200 Original-Received: from localhost ([::1]:45618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL4bH-0000Q4-60 for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Oct 2019 08:09:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52457) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iL4ZX-0007DK-Vx for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 08:08:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iL4ZW-0001v2-RI for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 08:08:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38472) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iL4ZW-0001uW-LC for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 08:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iL4ZW-0002Nv-FK for bug-gnu-emacs@gnu.org; Thu, 17 Oct 2019 08:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Oct 2019 12:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30660 X-GNU-PR-Package: emacs Original-Received: via spool by 30660-submit@debbugs.gnu.org id=B30660.15713140419118 (code B ref 30660); Thu, 17 Oct 2019 12:08:02 +0000 Original-Received: (at 30660) by debbugs.gnu.org; 17 Oct 2019 12:07:21 +0000 Original-Received: from localhost ([127.0.0.1]:47293 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iL4Yq-0002N0-Qt for submit@debbugs.gnu.org; Thu, 17 Oct 2019 08:07:21 -0400 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:36936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iL4Yo-0002Mn-Ad for 30660@debbugs.gnu.org; Thu, 17 Oct 2019 08:07:18 -0400 Original-Received: by mail-wr1-f52.google.com with SMTP id p14so2063474wro.4 for <30660@debbugs.gnu.org>; Thu, 17 Oct 2019 05:07:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version:content-transfer-encoding; bh=DcKjzrlEvFX0xl5puZvN9ZKzRfmku4tCciwIFjw7zSs=; b=HuWmoNvjnVnvRPhvspXvUxj6VYW9e9RCu5XSu9mpayTwgFEUl98ZOhbfdwJrBUi2BI dpxIHMPusg/NB6RroaXJX5YeuoZOZ/ozHhuVSY2HnH4cfAJ6ygz3NuWazlnFEQYSEEhm gdC2UIMCsDLwk1592AHwNInhUnNUEdsEGK0SP6yKgfvR48j6XhlRWJdybMXhq70g3oxI fvyRbkY8t2Sq0a9UQSrK41a41/epxYlLz5wWs4Bfe/aXy/B2PIXbmXJ6K900EWCm8DkD prf1lp+Y56HipA84ZzjNIpSbsb8D5wxDa6Tfqo95Z6qYV+aV90wNjx2X9LPEbdQxpPwt C3lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=DcKjzrlEvFX0xl5puZvN9ZKzRfmku4tCciwIFjw7zSs=; b=n10l+kX7Md88tDPge9RexaHX/7DM6ZhtnF9+apkt5KmiuxKKA27nF58r+rpzJ0Ryq3 EXd4mEPaICopqFfUNhdUtbmIz4Gdmsay3QJcweg2A0jgAk9uNnOsH0e9xTbhQjmivkYi /xzdF7NIN+K+4JfB2+42sekkzKTxV3/+u4okscDL6iSNU8qAOO9/uA9L+M5ht2vX3yFX HpT+iWQ75YzgPdrn/N+oaU7oPOryM141d9q5arsKUDrgc4r5Hpr9o/JR4itHAOWfkfV/ t68yZKuAGcJEkm4tbTBQ1Sxzy+d+KoqwP6I1Yrzxzde9q2uF695FgOnCkCNEOgK9xscT 9XCw== X-Gm-Message-State: APjAAAUPhQCsW+EWWJduga3QC1UeXknjKQ+48oWujC7mIG4zqcUbl06g 07nwgrYsBpyrAtxfypp8Kj8= X-Google-Smtp-Source: APXvYqw0xkbwgN6uf3W7Ri2pTzLCmM0X3PiAF0m2SctMwHQkCThXqhzJhfO+SjeecvB2b1hsHnrUgA== X-Received: by 2002:adf:f78f:: with SMTP id q15mr2665395wrp.282.1571314032257; Thu, 17 Oct 2019 05:07:12 -0700 (PDT) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id d4sm2328839wrc.54.2019.10.17.05.07.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2019 05:07:11 -0700 (PDT) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: (Stefan Kangas's message of "Thu, 17 Oct 2019 11:42:25 +0200") 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:169562 Archived-At: >>>>> On Thu, 17 Oct 2019 11:42:25 +0200, Stefan Kangas = said: Stefan> * lisp/help-fns.el (describe-keymap): New function to show key Stefan> bindings for a given keymap. (Bug#30660) Stefan> * doc/lispref/keymaps.texi (Scanning Keymaps): Document it. Stefan> * etc/NEWS: Announce it. Stefan> * test/lisp/help-fns-tests.el (help-fns-test-describe-keymap/sy= mbol) Stefan> (help-fns-test-describe-keymap/value) Stefan> (help-fns-test-describe-keymap/value+search-symbols) Stefan> (help-fns-test-describe-keymap/symbol+search-symbols) Stefan> (help-fns-test-describe-keymap/not-keymap) Stefan> (help-fns-test-describe-keymap/let-bound) Stefan> (help-fns-test-describe-keymap/dynamically-bound-no-file): New = tests. Stefan> --- Stefan> doc/lispref/keymaps.texi | 12 ++++++ Stefan> etc/NEWS | 3 ++ Stefan> lisp/help-fns.el | 73 +++++++++++++++++++++++++++++= ++++++++ Stefan> test/lisp/help-fns-tests.el | 41 +++++++++++++++++++++ Stefan> 4 files changed, 129 insertions(+) Stefan> diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi Stefan> index 532e537026..569e6137e6 100644 Stefan> --- a/doc/lispref/keymaps.texi Stefan> +++ b/doc/lispref/keymaps.texi Stefan> @@ -2004,6 +2004,18 @@ Scanning Keymaps Stefan> instead of the current buffer's. Stefan> @end deffn =20 Stefan> +@deffn Command describe-keymap keymap &optional search-symbols Stefan> +This function creates a listing of all key bindings in variable s/variable// Stefan> +@var{keymap}, and displays it in a buffer named @file{*Help*}.= When Stefan> +called interactively, prompt for a variable that has a keymap = value. Stefan> + Stefan> +If optional argument @var{search-symbols} is non-nil, and @var= {keymap} Stefan> +is not a symbol, search all variables for one whose value is K= EYMAP @var{keymap} I=CA=BCm not clear on why it needs such a convoluted API, but I guess it=CA= =BCs useful to someone. Could the searching not be split into a 'find-keymap' function? Robert