unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#75366: [PATCH] Improve the doc of key-valid-p
@ 2025-01-04 20:37 Hong Xu
  2025-01-04 20:44 ` Hong Xu
  2025-01-04 20:49 ` Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: Hong Xu @ 2025-01-04 20:37 UTC (permalink / raw)
  To: 75366

* lisp/keymap.el (key-valid-p): Add an function key example.  Mention
<left> as a cursor control key instead of a function key.  Rename
some "characters" to "key strokes" to be consistent with the terminology
in the first paragraph.  Briefly explain what an event may be.
---
 lisp/keymap.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/keymap.el b/lisp/keymap.el
index 3aed1d4b4cac..e447bf648a10 100644
--- a/lisp/keymap.el
+++ b/lisp/keymap.el
@@ -327,21 +327,23 @@ key-valid-p
 with a single space character separating one key stroke from another.
 
 Each key stroke is either a single character, or the name of an
-event, surrounded by angle brackets <like-this>.  In addition, any
-key stroke may be preceded by one or more modifier keys.  Finally,
-a limited number of characters have a special shorthand syntax.
+event, surrounded by angle brackets <like-this>.  An event may be a key
+stroke or a menu item.  In addition, any key stroke may be preceded by
+one or more modifier keys.  Finally, a limited number of key strokes
+have a special shorthand syntax.
 
 Here are some example of valid key sequences.
 
   \"f\"           (the key `f')
+  \"<f6>\"        (the function key named \"F6\")
   \"S o m\"       (a three-key sequence of the keys `S', `o' and `m')
   \"C-c o\"       (a two-key sequence: the key `c' with the control modifier
                  followed by the key `o')
-  \"H-<left>\"    (the function key named \"left\" with the hyper modifier)
+  \"H-<left>\"    (the cursor control key named \"left\" with the hyper modifier)
   \"M-RET\"       (the \"return\" key with a meta modifier)
   \"C-M-<space>\" (the \"space\" key with both the control and meta modifiers)
 
-These are the characters that have special shorthand syntax:
+These key strokes have special shorthand syntax:
 NUL, RET, TAB, LFD, ESC, SPC, DEL.
 
 Modifiers have to be specified in this order:
-- 
2.47.1






^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-01-05  6:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-04 20:37 bug#75366: [PATCH] Improve the doc of key-valid-p Hong Xu
2025-01-04 20:44 ` Hong Xu
2025-01-04 20:49 ` Eli Zaretskii
2025-01-04 21:43   ` Hong Xu
2025-01-05  6:35     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).