all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bob Rogers <rogers@rgrjr.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 62279@debbugs.gnu.org
Subject: bug#62279: Add an option to restore C-h b "Prefix Command" output
Date: Sun, 19 Mar 2023 12:59:45 -0700	[thread overview]
Message-ID: <25623.27057.76142.835365@orion.rgrjr.com> (raw)
In-Reply-To: <83zg888rg6.fsf@gnu.org>

[-- Attachment #1: message body text --]
[-- Type: text/plain, Size: 1686 bytes --]

   From: Eli Zaretskii <eliz@gnu.org>
   Date: Sun, 19 Mar 2023 21:35:37 +0200

   > From: Bob Rogers <rogers@rgrjr.com>
   > 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


[-- Attachment #2: describe-bindings-show-prefixes-3.patch --]
[-- Type: text/x-patch, Size: 1667 bytes --]

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

  reply	other threads:[~2023-03-19 19:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-19 19:26 bug#62279: Add an option to restore C-h b "Prefix Command" output Bob Rogers
2023-03-19 19:35 ` Eli Zaretskii
2023-03-19 19:59   ` Bob Rogers [this message]
2023-03-23  8:33     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25623.27057.76142.835365@orion.rgrjr.com \
    --to=rogers@rgrjr.com \
    --cc=62279@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.