emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 2ef6f943abd: Add option to control default outlining in 'C-h b'


From: Eli Zaretskii
Subject: master 2ef6f943abd: Add option to control default outlining in 'C-h b'
Date: Mon, 24 Apr 2023 07:42:19 -0400 (EDT)

branch: master
commit 2ef6f943abd41747aa733c0f51e08dfd44ddb82a
Author: Eshel Yaron <me@eshelyaron.com>
Commit: Eli Zaretskii <eliz@gnu.org>

    Add option to control default outlining in 'C-h b'
    
    * lisp/help.el (describe-bindings-outline-rules): New user option.
    (describe-bindings): Use it instead of hardcoding "Key translations".
    (Bug#62708)
---
 etc/NEWS     |  5 +++++
 lisp/help.el | 13 +++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index ca529be7aa1..4c5f50e343e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -30,6 +30,11 @@ applies, and please also update docstrings as needed.
 
 * Changes in Emacs 30.1
 
+---
+** New user option 'describe-bindings-outline-rules'.
+This user option controls outline visibility in the output buffer of
+'describe-bindings' when 'describe-bindings-outline' in non-nil.
+
 ** X selection requests are now handled much faster and asynchronously.
 This means it should be less necessary to disable the likes of
 'select-active-regions' when Emacs is running over a slow network
diff --git a/lisp/help.el b/lisp/help.el
index 6eac037df2c..886c6e0acc8 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -727,6 +727,16 @@ Return nil if KEYS is nil."
   :group 'help
   :version "29.1")
 
+(defcustom describe-bindings-outline-rules '((match-regexp . "Key 
translations"))
+  "Visibility rules for outlines in the output buffer of `describe-bindings'.
+This is used as the value of `outline-default-rules' in the
+output buffer of `describe-bindings' when
+`describe-bindings-outline' is non-nil, otherwise this option
+doesn't have any effect."
+  :type 'boolean
+  :group 'help
+  :version "30.1")
+
 (declare-function outline-hide-subtree "outline")
 
 (defun describe-bindings (&optional prefix buffer)
@@ -756,8 +766,7 @@ or a buffer name."
                       outline-minor-mode-use-buttons 'insert
                       ;; Hide the longest body.
                       outline-default-state 1
-                      outline-default-rules
-                      '((match-regexp . "Key translations")))
+                      outline-default-rules describe-bindings-outline-rules)
           (outline-minor-mode 1)
           (save-excursion
             (goto-char (point-min))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]