From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bob Rogers Newsgroups: gmane.emacs.bugs Subject: bug#62279: Add an option to restore C-h b "Prefix Command" output Date: Sun, 19 Mar 2023 12:26:46 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40766"; mail-complaints-to="usenet@ciao.gmane.io" To: 62279@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 19 20:27:40 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pdygt-000ANu-Td for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Mar 2023 20:27:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pdygK-00028J-A8; Sun, 19 Mar 2023 15:27:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdygI-00027T-7w for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2023 15:27:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pdygH-00054B-Vm for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2023 15:27:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pdygH-00059Q-Qm for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2023 15:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Bob Rogers Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Mar 2023 19:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62279 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.167925401519785 (code B ref -1); Sun, 19 Mar 2023 19:27:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 19 Mar 2023 19:26:55 +0000 Original-Received: from localhost ([127.0.0.1]:52794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdygB-000593-4e for submit@debbugs.gnu.org; Sun, 19 Mar 2023 15:26:55 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:33140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdyg9-00058s-NR for submit@debbugs.gnu.org; Sun, 19 Mar 2023 15:26:54 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdyg9-00026N-Hh for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2023 15:26:53 -0400 Original-Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pdyg6-00052t-C8 for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2023 15:26:53 -0400 Original-Received: by mail-pj1-x1030.google.com with SMTP id l9-20020a17090a3f0900b0023d32684e7fso11917822pjc.1 for ; Sun, 19 Mar 2023 12:26:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rgrjr-com.20210112.gappssmtp.com; s=20210112; t=1679254009; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=fTJQMNg0cs0io3vCHNWLgzxv5nBf53SZh6rkp7eF6po=; b=txnALV90Ut/j6LtBEm0AmdB5NTdR4MC9Qn8RD5+s/ouGw+8C8KFFYUT2KBZFdSPdNM N3airhU32172Ef0hhscwLd5R8/bhETnosDYSiQq6SqjqHRsiUqrl8ejL3Xy2jnaWeIpZ LA9lT0hkiNoh9t5cZ4dwXrggdp95P+6cSGELo8kImyLNvzp/quWUX1lWJhRSoqdWht+Y T4bQS0Kv7lD355JF6jpk64rvA+rKxpZu1dyRvW8UYWAj35udcx88Ibv4afjcfXGWh1i9 RyQt2cHi8HRSj7XNSc/vVWsfLG/Z7fwgWWwb9Osx6J1ftb+/ZMys3iyPzi+2Ess1ztik CKtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679254009; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=fTJQMNg0cs0io3vCHNWLgzxv5nBf53SZh6rkp7eF6po=; b=va5xXNu245QugsuCoh4mPF+1VldOuoVyZlwMyl1yEEVguLTcJTN567b4sQeDvOI17N jdqkRRmjf9f84TBs8Tl4snxfmaUyxu9gVOfPmteS1ZS89wgXd8QcfPq2cxvSKBhoN7TX GDP3xxpXJsnQj9s11qv+ZCuRXVO2mf2l8YorI0AjnvQaRhfOhG+RLbn169erFKDF9OcO a/flJgrZHX39EGPJw1bjU94ObIzp5cmoFZob15Lx0h2yEfPt79mLy6109Jz2YhUuHXrp DRP99gjpS/pPI4mcRJNwjiHPmhwlO1wMDyYwqXN7KR9v8Atv9v28PExaPFTs0Kjr5bpu 7prA== X-Gm-Message-State: AO0yUKXsoWb3vVPAnbwl/IjzRAKTZPl0jmc5ElGcXwvYK9AWjUJ8MDkD MJ/PZdkkIvQxeaMVbcbGwKIyt0AmS4+W/9jU344= X-Google-Smtp-Source: AK7set+2mxcXtXE79e7c8NbBMv7rfs3zWy57GJwHcdcZwTIq3bwuJorsTw10qlxZZlJJo5mGZngEaQ== X-Received: by 2002:a17:90a:19d1:b0:237:752f:1af0 with SMTP id 17-20020a17090a19d100b00237752f1af0mr16044457pjj.29.1679254008689; Sun, 19 Mar 2023 12:26:48 -0700 (PDT) Original-Received: from orion.rgrjr.com ([2600:1700:7c2c:e000::24]) by smtp.gmail.com with ESMTPSA id q10-20020a17090a304a00b00233acae2ce6sm8077941pjl.23.2023.03.19.12.26.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Mar 2023 12:26:48 -0700 (PDT) Received-SPF: none client-ip=2607:f8b0:4864:20::1030; envelope-from=rogers@rgrjr.com; helo=mail-pj1-x1030.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258255 Archived-At: --=-=-= Content-Type: text/plain Tags: patch Pursuant to the 'No more "Prefix Command" in C-h m' discussion in the emacs-devel list. -- Bob Rogers http://www.rgrjr.com/ In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0) of 2023-03-13 built on orion Repository revision: a79d209748857c7d63ac48a7172a89e5ad1e752b Repository branch: rgr-smtpmail-env-from Windowing system distributor 'The X.Org Foundation', version 11.0.12003000 System Description: openSUSE Leap 15.4 Configured using: 'configure --with-dbus=no --with-gsettings=no --with-gif=ifavailable --with-tiff=no --with-gnutls=yes --with-gconf=no' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=describe-bindings-show-prefixes-2.patch Add an option to restore C-h b "Prefix Command" output * lisp/help.el (describe-bindings-show-prefixes): Option to enable prefixes. (describe-map): If true, restore "Prefix Command" output. * etc/NEWS: Describe the new option. diff --git a/etc/NEWS b/etc/NEWS index 3b02e85b691..5a4a038e953 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -61,6 +61,11 @@ This allows the user to customize the prompt that is appended by This is used for displaying the time and date components of 'display-time-mode'. +** New user option 'describe-bindings-show-prefixes'. +If true (the default is false), restores the "Prefix Command" entries +in 'describe-binding' ('C-h b') output for keys that are prefixes, the +details of which are shown later (regardless of this option setting). + * Editing Changes in Emacs 30.1 diff --git a/lisp/help.el b/lisp/help.el index 83be85b1ee4..37a08718f9d 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -717,6 +717,12 @@ describe-bindings-outline :group 'help :version "29.1") +(defcustom describe-bindings-show-prefixes nil + "Non-nil shows prefixes in the output buffer of `describe-bindings'." + :type 'boolean + :group 'help + :version "30.1") + (declare-function outline-hide-subtree "outline") (defun describe-bindings (&optional prefix buffer) @@ -1699,6 +1705,7 @@ describe-map (setq vect (cdr vect)) (setq end (caar vect)))) (when (or (not (eq start end)) + describe-bindings-show-prefixes ;; Don't output keymap prefixes. (not (keymapp definition))) (when first --=-=-=--