summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2021-12-08 16:22:10 +0200
committerEli Zaretskii <eliz@gnu.org>2021-12-08 16:22:10 +0200
commit538fc1d0e07aed0e535d9e9f2063f429238df422 (patch)
tree2c1b1ebe40ff909d76cc2008fa269a049fd7386d /doc
parentc8c7822c51325ed300c0ffb91ce42e1868c6bda4 (diff)
downloademacs-538fc1d0e07aed0e535d9e9f2063f429238df422.tar.gz
Fix mode-line display in Calendar mode
* lisp/help.el (substitute-command-keys): New optional argument NO-FACE, to avoid putting the 'help-key-binding' face on the key bindings. * lisp/calendar/calendar.el (calendar-mode-line-entry): Call 'substitute-command-keys' with the new optional argument non-nil. (Bug#52366) * doc/lispref/help.texi (Keys in Documentation): Document the new optional argument of 'substitute-command-keys'. * etc/NEWS: Announce the addition of a new argument to 'substitute-command-keys'.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/help.texi8
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index a788852de75..a48571838cc 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -372,11 +372,15 @@ quotes. You can customize it freely according to your personal
preference.
@end defopt
-@defun substitute-command-keys string
+@defun substitute-command-keys string &optional no-face
+@vindex help-key-binding@r{ (face)}
This function scans @var{string} for the above special sequences and
replaces them by what they stand for, returning the result as a string.
This permits display of documentation that refers accurately to the
-user's own customized key bindings.
+user's own customized key bindings. By default, the key bindings are
+given a special face @code{help-key-binding}, but if the optional
+argument @var{no-face} is non-@code{nil}, the function doesn't add
+this face to the produced string.
@cindex advertised binding
If a command has multiple bindings, this function normally uses the