GNU bug report logs -
#70139
29.3.50; key-translate does not support all keyboard-translate usages
Previous Next
Reported by: Robert Pluim <rpluim <at> gmail.com>
Date: Tue, 2 Apr 2024 09:52:04 UTC
Severity: normal
Found in version 29.3.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Robert Pluim <rpluim <at> gmail.com>
> Date: Tue, 02 Apr 2024 11:50:40 +0200
>
>
> When `key-translate' was added, it didnʼt cover all the cases that
> `keyboard-translate' does.
>
> Add a translation:
>
> (keyboard-translate ?\C-a ?\C-z)
>
> Two ways to remove, of which I submit the first is 'obvious':
>
> (keyboard-translate ?\C-a nil)
> (keyboard-translate ?\C-a ?\C-a)
>
> Add:
>
> (key-translate "C-a" "C-z")
>
> This works for removing a translation but is non-obvious:
>
> (key-translate "C-a" "C-a")
>
> But this doesnʼt:
>
> (key-translate "C-a" nil)
>
> =>
> Debugger entered--Lisp error: (error "nil is not a valid key definition; see ‘key-valid-...")
> signal(error ("nil is not a valid key definition; see ‘key-valid-..."))
> error("%S is not a valid key definition; see `key-valid-p..." nil)
>
> Iʼm not sure this is worth fixing, but perhaps documenting that
> re-adding the same translation is (almost) the same as removing it?
Stefan, any comments or suggestions?
This bug report was last modified 1 year and 54 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.