GNU bug report logs - #70139
29.3.50; key-translate does not support all keyboard-translate usages

Previous Next

Package: emacs;

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


Message #26 received at 70139 <at> debbugs.gnu.org (full text, mbox):

From: Charalampos Mitrodimas <charmitro <at> posteo.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 70139 <at> debbugs.gnu.org
Subject: Re: bug#70139: [PATCH] Improve key-translate to support removing
 translations
Date: Thu,  4 Apr 2024 19:48:16 +0000
Hi,

Thanks for your review, much appreciated.

On 4/4/24 4:00 PM, Stefan Monnier via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> I don't have much to say about this bug report or the fix for it, I'm
> not very familiar with the `keyboard-translate-table` part of our
> input processing.
>
>>     (aset keyboard-translate-table
>>           (aref (key-parse from) 0)
>> -        (aref (key-parse to) 0)))
>> +        (and to (aref (key-parse to) 0))))
> But here, I think that, in keeping with the tradition of the `key-*`
> functions, we should signal an error if `key-parse` returns an array
> longer than 1 element, instead of just using the first element and
> silently dropping the rest on the floor.
>
>
>          Stefan

Just to clarify, are you referring to something like this?

    (key-translate "C-x" "C-z" "C-a")


--
Charalampos





This bug report was last modified 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.