bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70139: [PATCH] Improve key-translate to support removing translation


From: Charalampos Mitrodimas
Subject: 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]