summaryrefslogtreecommitdiff
path: root/doc/lispref/help.texi
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-11-22 06:44:10 +0100
committerStefan Kangas <stefan@marxist.se>2021-11-22 06:44:10 +0100
commit1aef1a6673bc29784effe10d2e01e62b49c0112c (patch)
treef8c0e96c0d36d4a1606740aadb2d427901423424 /doc/lispref/help.texi
parent5fcff0d2cbe33faef8bbb753a5f02fb26b1d7e5c (diff)
downloademacs-1aef1a6673bc29784effe10d2e01e62b49c0112c.tar.gz
Add new format for literal key sequences to substitute-command-keys
* lisp/help.el (substitute-command-keys): Add new format "\\`f'" for literal key sequences. (Bug#50804) * doc/lispref/help.texi (Keys in Documentation): Document the above new substitution. * test/lisp/help-tests.el (help-tests-substitute-command-keys/literal-key-sequence): (help-tests-substitute-command-keys/literal-key-sequence-errors): New tests. (help-tests-substitute-key-bindings/face-help-key-binding): Extend test.
Diffstat (limited to 'doc/lispref/help.texi')
-rw-r--r--doc/lispref/help.texi7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index a788852de75..1a9eb30fde1 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -333,6 +333,13 @@ stands for no text itself. It is used only for a side effect: it
specifies @var{mapvar}'s value as the keymap for any following
@samp{\[@var{command}]} sequences in this documentation string.
+@item \`@var{KEYSEQ}'
+stands for a key sequence @var{KEYSEQ}, which will use the same face
+as a command substitution. This should be used only when a key
+sequence has no corresponding command, for example when it is read
+directly with @code{read-key-sequence}. It must be a valid key
+sequence according to @code{key-valid-p}.
+
@item `
(grave accent) stands for a left quote.
This generates a left single quotation mark, an apostrophe, or a grave