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