GNU bug report logs -
#58747
28.2; local-function-key-map is not used when used with input-decode-map and modifier
Previous Next
Full log
Message #11 received at 58747 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii [2022-10-27 19:10:42] wrote:
>> Date: Mon, 24 Oct 2022 01:06:49 +0800
>> From: Lin Jian via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>>
>>
>> Steps to reproduce this bug:
>> 1. emacs -q
>> 2. (define-key input-decode-map [?w] [a-not-used-symbol-xxx-0])
>> 3. (define-key local-function-key-map [a-not-used-symbol-xxx-0] [a-not-used-symbol-xxx-1])
>> 4. (define-key key-translation-map [a-not-used-symbol-xxx-1] [a-not-used-symbol-xxx-2])
>> 5. (define-key key-translation-map [a-not-used-symbol-xxx-0] [a-not-used-symbol-xxx-3])
>> 6. C-h k w
>> 7. check the *Messages* buffer, you will see
>>
>> <a-not-used-symbol-xxx-2> (translated from w) is undefined
>>
>> This is good.
>> 8. C-h k C-x w
>> 9. check the *Messages* buffer, you will see
>>
>> C-x <a-not-used-symbol-xxx-3> (translated from C-x w) is undefined
>>
>> I think this is a bug, which means local-function-key-map is not
>> used. The expected result should be
>>
>> C-x <a-not-used-symbol-xxx-2> (translated from C-x w) is undefined
>
> Stefan, any comments?
Great bug report, thank you. Intriguing.
:-)
The corresponding code is quite tricky.
Offhand I can't guess what's going on here, sorry.
It will probably take single stepping through the `read_key_sequence`
monster to try and figure out the reason (and maybe even end up
discovering that it's a "feature", or more specifically that fixing it
without breaking something else is nigh-on impossible).
Stefan
This bug report was last modified 2 years and 287 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.