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:59:45 -0700 Message-ID: <25623.27057.76142.835365@orion.rgrjr.com> References: <83zg888rg6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MfnzWuhdc8" Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3376"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62279@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 19 21:00:18 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 1pdzCT-0000jA-Sa for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Mar 2023 21:00:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pdzCH-000173-J3; Sun, 19 Mar 2023 16:00:05 -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 1pdzCF-00016p-CE for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2023 16:00:03 -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 1pdzCF-00020N-3F for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2023 16:00:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pdzCE-0008VH-JK for bug-gnu-emacs@gnu.org; Sun, 19 Mar 2023 16:00:02 -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 20:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62279 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 62279-submit@debbugs.gnu.org id=B62279.167925599532651 (code B ref 62279); Sun, 19 Mar 2023 20:00:02 +0000 Original-Received: (at 62279) by debbugs.gnu.org; 19 Mar 2023 19:59:55 +0000 Original-Received: from localhost ([127.0.0.1]:52833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdzC6-0008UY-Sj for submit@debbugs.gnu.org; Sun, 19 Mar 2023 15:59:55 -0400 Original-Received: from mail-pj1-f50.google.com ([209.85.216.50]:41562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdzC4-0008UK-Uo for 62279@debbugs.gnu.org; Sun, 19 Mar 2023 15:59:53 -0400 Original-Received: by mail-pj1-f50.google.com with SMTP id fy10-20020a17090b020a00b0023b4bcf0727so10406038pjb.0 for <62279@debbugs.gnu.org>; Sun, 19 Mar 2023 12:59:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rgrjr-com.20210112.gappssmtp.com; s=20210112; t=1679255987; h=references:in-reply-to:subject:cc:to:date:message-id :content-transfer-encoding:mime-version:from:from:to:cc:subject:date :message-id:reply-to; bh=ilK5LGlZEtIGYN9DehtHbYJH4SfiT6amUjk8rMtpWvU=; b=tUbX4jdkF4vOxqgULiae9+M363yemK2IysCD85y8ZTIbpU+oNWnxMEjwBbn8/XC1JB 6RJy0utRyu3bR5a1gsi6dTZfONpW42/lpDteh2GFQZUCAUw1eQzkYIwoyj7og3NT3n1X Le4/WvpM09n6/e6XtgCU7bFobGkBiIQi6JgDtXOX9Pm3KWlOHRgnTXBofJQpR9OH4sXc HTQq9DXFhKbYqc/rvkYMymZYqd9au6xthe/mDZ5X3DrZyaLW8Fld/m3AdkLcf1aOOii9 OrDe0K8RFqh1q2M4UeJ0anxOMqngTdEBnueO+HMPaEOT8lMvKHSUGIf+bicxaGVSyXv1 DXBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679255987; h=references:in-reply-to:subject:cc:to:date:message-id :content-transfer-encoding:mime-version:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ilK5LGlZEtIGYN9DehtHbYJH4SfiT6amUjk8rMtpWvU=; b=EGV5MruvgXKMuDAhAfQSJ77CTt+rJ+CANCiCrVuxnzTVouf/oW5iwKGzwMZzXph+eX /YzeE42uw6X3+vyaqj8blspWfYCVeYlLChoLBHUHccqzoPnvAoCLHhB9DpK6Ie2Rmrk9 l7jYOGx0SZrOUF5sIkMZ0C5PTl+JGyb0CM3/QHTzbKe3ftMdcBTVpG3lj3EaQzIHb/xN IZGZUCY8+v+2xpTl6C6NKQdgcC9CirkqgF7jcDualQARHqepacBietP0hJgYXlqgn/fK h8napXXQEes3zhsSezjXmu11vHwcIiZfOgt+sYM6aVFm+mIX2GwAq7fW6Ssa4zFD4v+D J6rQ== X-Gm-Message-State: AO0yUKVXYc+eCYDYmMtwUUIomJaARMCuLSUPIX8WWWp+tV/10EkIWVHA fPXJAngZ2SaB1LDJ1xPWr7x0kQ== X-Google-Smtp-Source: AK7set9jY67D7p+a1n82xIJTKz0G2AonVLcQ1h3UmdyMmDKYFr1TsqeGYwAVIt9kp9kqqJSPXZnM0A== X-Received: by 2002:a17:90a:4041:b0:23f:9445:318c with SMTP id k1-20020a17090a404100b0023f9445318cmr3869305pjg.38.1679255986952; Sun, 19 Mar 2023 12:59:46 -0700 (PDT) Original-Received: from orion.rgrjr.com ([2600:1700:7c2c:e000::24]) by smtp.gmail.com with ESMTPSA id bh9-20020a17090b048900b0023af4eb597csm8293429pjb.52.2023.03.19.12.59.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Mar 2023 12:59:46 -0700 (PDT) In-Reply-To: <83zg888rg6.fsf@gnu.org> X-Mailer: VM 8.2.0b under 30.0.50 (x86_64-pc-linux-gnu) 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:258257 Archived-At: --MfnzWuhdc8 Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit From: Eli Zaretskii Date: Sun, 19 Mar 2023 21:35:37 +0200 > From: Bob Rogers > Date: Sun, 19 Mar 2023 12:26:46 -0700 > > Pursuant to the 'No more "Prefix Command" in C-h m' discussion in the > emacs-devel list. Thanks. > --- 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 We use "If non-nil", not "If true". And similarly for "false". Guess I've been thinking too much in Perl lately. ;-} > +in 'describe-binding' ('C-h b') output for keys that are prefixes, the > +details of which are shown later (regardless of this option setting). This NEWS entry should go to where the change in "C-h b"s behavior is described in NEWS (on emacs-29 branch), and should be reworded to tell users how to get the previous behavior back ("To get the previous behavior back, customize ..."). OK. I also subordinated it to the "Keymap descriptions have changed" entry, since that seemed apt. > +(defcustom describe-bindings-show-prefixes nil > + "Non-nil shows prefixes in the output buffer of `describe-bindings'." > + :type 'boolean > + :group 'help > + :version "30.1") This should be "29.1". Since the behavior change was introduced in Emacs 29, we need to add this option in the same version. OK, I wasn't sure Lars' change actually made it into 29. -- Bob --MfnzWuhdc8 Content-Type: text/x-patch; name="describe-bindings-show-prefixes-3.patch" Content-Disposition: inline; filename="describe-bindings-show-prefixes-3.patch" Content-Transfer-Encoding: 7bit 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 a5f9f8c6ec1..c4e16221d72 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3563,6 +3563,10 @@ keymap descriptions have changed. In particular, prefix commands are not output at all, and instead of "??" for closures/functions, "[closure]"/"[lambda]" is output. +*** New user option 'describe-bindings-show-prefixes'. +To reinstate the "Prefix Command" entries in key binding output for +keys that are prefixes, set this option non-nil (the default is nil). + --- ** 'downcase' details have changed slightly. In certain locales, changing the case of an ASCII-range character may diff --git a/lisp/help.el b/lisp/help.el index 83be85b1ee4..3e450fe0763 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 "29.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 --MfnzWuhdc8--