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)
This commit is contained in:
parent
62e4eb8fcf
commit
2ef6f943ab
2 changed files with 16 additions and 2 deletions
5
etc/NEWS
5
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
|
||||
|
|
13
lisp/help.el
13
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))
|
||||
|
|
Loading…
Add table
Reference in a new issue