From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hong Xu Newsgroups: gmane.emacs.bugs Subject: bug#75366: [PATCH] Improve the doc of key-valid-p Date: Sat, 4 Jan 2025 12:37:53 -0800 Message-ID: <20250104203955.139589-1-hong@topbug.net> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7140"; mail-complaints-to="usenet@ciao.gmane.io" To: 75366@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 04 21:41:20 2025 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tUAxT-0001iM-NH for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Jan 2025 21:41:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tUAxF-00055G-Bn; Sat, 04 Jan 2025 15:41:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUAxE-000552-5u for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 15:41:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tUAxC-0007mA-MV for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 15:41:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=DbGahLqLrEIktB63qI2aj/FWwPn+oYpRh7s+8Q31hn0=; b=prAFt1X0RuME+BFwb+ozzFVdrQwL9SIW1+L2WaSHnZxxGXGwgt+jATvdHxwjoB7EOVzuZVftWxtuvsRQM05DCT9Y6R1Ko27Wvto2jFKl09+EcHKffSKayNKyfEVLTDbhPYvp0X2KEe2878zF6Pb45iFokYqs/AS/toPAvtZbN/lsyY2aksPpGyWvd9p6EdNyc/DWAv2TRjV7pGtAGy/HODOMax2l6LVjTrNBYTXJicvHGKwV3MaxEBX0baFdcP5stG0Li8F05NGEhFiNOmgUIYrDNJBiy6YqNbodemXp1ConnscuRt1KYfsseUVRVWBt68CooB32JxyT+2PYf4nC6Q==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tUAxC-0003qn-BE for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 15:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Hong Xu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jan 2025 20:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75366 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.173602321614730 (code B ref -1); Sat, 04 Jan 2025 20:41:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Jan 2025 20:40:16 +0000 Original-Received: from localhost ([127.0.0.1]:57597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tUAwS-0003pV-B3 for submit@debbugs.gnu.org; Sat, 04 Jan 2025 15:40:16 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:55228) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tUAwN-0003mb-U8 for submit@debbugs.gnu.org; Sat, 04 Jan 2025 15:40:14 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUAwI-0004wp-1z for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 15:40:06 -0500 Original-Received: from sender4-of-o54.zoho.com ([136.143.188.54]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tUAwF-00065K-Rz for bug-gnu-emacs@gnu.org; Sat, 04 Jan 2025 15:40:05 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1736023197; cv=none; d=zohomail.com; s=zohoarc; b=REVhaj/0qJh8yjNF6WSd4aB3wK9xJneWFEFB442ZgtwqrkEttkBQKjT/7vCmElfw/ucRlV18HkG/OKWKXv10oVU5fm7xDhqsUiry0wg6slabnr5cOmzZkwH8efGjQFtsFmVzzTyA5vmWhiqZPOlJAdcrGQZL2f7YZWqsdPUekNc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1736023197; h=Content-Transfer-Encoding:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=DbGahLqLrEIktB63qI2aj/FWwPn+oYpRh7s+8Q31hn0=; b=ODvkv1pEKBMYkbW5eNZEbndgf3B0/5hbDS/vYxhZNdc9Exg5V8dOGJ9cn2y6u9+LD0Hs5k2l0cHrdl9+TxH+HtcUy/si+gmvblcG7R+P+Zh4vAZr6PKGzQYWujOpKctU0x9q9q1Gxfw9TCsCe5Gbhly3Q1uV7R2GZSoGdCdNHYU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=topbug.net; spf=pass smtp.mailfrom=hong@topbug.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1736023197; s=zoho; d=topbug.net; i=hong@topbug.net; h=From:From:To:To:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To:Cc; bh=DbGahLqLrEIktB63qI2aj/FWwPn+oYpRh7s+8Q31hn0=; b=Jryy0Vmt4HT3PDByeGKAU/3hPBph6y5AByIK1YC6nQYsSWmPnP3WNY3saKTlF0Pk P+NIJRivHANqxD2Rl9gf+osRtPJGvH9g+OTY6JETh/uM/XdRT8qQkpkJdI2p2x+W3MS yT3sIMYqvJ8tzvcbbsn6OV1NoafNJ/asP7XwIfXg= Original-Received: by mx.zohomail.com with SMTPS id 1736023195926161.3190665673103; Sat, 4 Jan 2025 12:39:55 -0800 (PST) X-Mailer: git-send-email 2.47.1 X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.54; envelope-from=hong@topbug.net; helo=sender4-of-o54.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298470 Archived-At: * lisp/keymap.el (key-valid-p): Add an function key example. Mention 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 . 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 . 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') + \"\" (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-\" (the function key named \"left\" with the hyper modifier) + \"H-\" (the cursor control key named \"left\" with the hyper modifier) \"M-RET\" (the \"return\" key with a meta modifier) \"C-M-\" (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