emacs-devel
[Top][All Lists]
Advanced

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

Re: Suggested experimental test


From: Dmitry Gutov
Subject: Re: Suggested experimental test
Date: Sun, 28 Mar 2021 16:59:12 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

Hi Stefan,

On 27.03.2021 02:02, Stefan Monnier wrote:
While we can use such tricks, I think what we really want is to
abstract the keymap API such that we can provide keymaps whose elements
are computed dynamically.

There'd need to be at least 2 methods: `lookup-key`, and `map-keymap`,
and adding `where-is` would probably allow better behaviors (but could
introduce other problems given the way where-is currently works).

One application is to create a keymap (on function-key-map) that remaps
all the events of the form "modifiers + mouse-4" to "same-modifiers +
scroll-up".

Another would be a keymap that binds the same keys as some other keymap
except it requires some additional modifier or it removes a modifier, or
it capitalizes all the letters, or it transcribes all the cyrillic
letters to their "equivalent" ASCII, ...

Could you give an example of how this facility will be used? Modes will be returning "generic" keymaps by using (mode-local-kbd "...") as Stefan K suggested?

Will easy-mmode-define-keymap return such keymaps? Or will the keymap values actually have the same structure, but behave differently because of augmented lookup-key, map-keymap, etc?



reply via email to

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