From: tpeplt <tpeplt@gmail.com>
To: 69893@debbugs.gnu.org
Subject: bug#69893: 29.2; Valid key "<TAB>" not accepted by `keymap-global-set'
Date: Mon, 18 Mar 2024 17:14:16 -0400 [thread overview]
Message-ID: <87plvr9r9z.fsf@gmail.com> (raw)
Recipe for reproducing this problem:
1. Start Emacs at a shell prompt using "emacs -Q".
2. Evaluate the following expressions in the *scratch* buffer.
The following keys evaluate as valid (as expected):
(key-valid-p "TAB")
(key-valid-p "<TAB>")
(key-valid-p "<tab>")
The following key evaluates as invalid (as expected):
(key-valid-p "tab")
3. So, the following expressions should evaluate to
‘indent-for-tab-command’:
(keymap-global-set "<tab>" 'indent-for-tab-command)
(keymap-global-set "TAB" 'indent-for-tab-command)
(keymap-global-set "<TAB>" 'indent-for-tab-command)
The first two expressions evaluate as expected, but when the third
expression is evaluated, then the following message is reported:
keymap-global-set: To bind the key TAB, use [?\t], not [TAB]
Because (key-valid-p "<TAB>") evaluates to t, that error message appears
to be invalid.
4. Also, the following expressions all evaluate to nil:
(key-valid-p "[?\t]")
(key-valid-p "[?\\t]")
(key-valid-p "?\t")
(key-valid-p "?\\t")
(key-valid-p "<?\t>")
(key-valid-p "<?\\t>")
So the error message appears to direct a user to change the key string
to an invalid key.
--
next reply other threads:[~2024-03-18 21:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 21:14 tpeplt [this message]
2024-03-21 12:36 ` bug#69893: 29.2; Valid key "<TAB>" not accepted by `keymap-global-set' Eli Zaretskii
2024-03-21 19:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-21 20:13 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87plvr9r9z.fsf@gmail.com \
--to=tpeplt@gmail.com \
--cc=69893@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).