unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#62279: Add an option to restore C-h b "Prefix Command" output
@ 2023-03-19 19:26 Bob Rogers
  2023-03-19 19:35 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Bob Rogers @ 2023-03-19 19:26 UTC (permalink / raw)
  To: 62279

[-- Attachment #1: Type: text/plain, Size: 639 bytes --]

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'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: describe-bindings-show-prefixes-2.patch --]
[-- Type: text/patch, Size: 1631 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 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).
+
 \f
 * 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-23  8:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2023-03-23  8:33     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).