]> git.eshelyaron.com Git - emacs.git/commit
Add new face 'help-key-binding' for keybindings in help
authorStefan Kangas <stefan@marxist.se>
Mon, 8 Mar 2021 02:29:42 +0000 (03:29 +0100)
committerStefan Kangas <stefan@marxist.se>
Mon, 8 Mar 2021 03:23:08 +0000 (04:23 +0100)
commit4a112fd7a6f0dcbd1b99b811b324123f5699bdfb
treeb3816a8ab7f3a05785ead1a590d0ab2dc5cd2921
parent8e103ebef12bb723723c7e6ec8e1053e86878a5b
Add new face 'help-key-binding' for keybindings in help

* lisp/faces.el (help-key-binding): New face.
* lisp/help.el
(help-for-help): Rename from 'help-for-help-internal'.  Use
'substitute-command-keys' syntax.
(help): Make into alias for 'help-for-help'.
(help-for-help-internal): Make into obsolete alias for
'help-for-help'.
(help--key-description-fontified): New function to add the
'help-key-binding' face.
(help-key-description, substitute-command-keys)
(describe-map-tree, help--describe-command)
(help--describe-translation, describe-map):
* lisp/help-fns.el (help-fns--key-bindings, describe-mode):
Use above new function.
* lisp/isearch.el (isearch-help-for-help-internal): Use
`substitute-command-keys' syntax.
* lisp/help-macro.el (make-help-screen): Use
'substitute-command-keys' and 'help--key-description-fontified'.
Simplify.
* src/keymap.c (describe_key_maybe_fontify): New function to add
the 'help-key-binding' face to keybindings.
(describe_vector): Use above new keybinding.
(syms_of_keymap) <Qfont_lock_face, Qhelp_key_binding>: New
DEFSYMs.
(fontify_key_properties): New static variable.
* lisp/tooltip.el (tooltip-show): Avoid overriding faces in
specified tooltip text.
* test/lisp/help-tests.el (with-substitute-command-keys-test):
Don't test for text properties.
(help-tests-substitute-command-keys/add-key-face)
(help-tests-substitute-command-keys/add-key-face-listing):
New tests.
etc/NEWS
lisp/faces.el
lisp/help-fns.el
lisp/help-macro.el
lisp/help.el
lisp/isearch.el
lisp/tooltip.el
src/keymap.c
test/lisp/help-tests.el