emacs-devel
[Top][All Lists]
Advanced

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

Re: Delegating user-reserved key binding space definition to users


From: Stefan Monnier
Subject: Re: Delegating user-reserved key binding space definition to users
Date: Mon, 21 Nov 2022 14:37:07 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

>    - Multiple modifiers such as M-S-* or long sequences such as C-* C-* *.
>    M-? is also an example of what I consider to require multiple-modifiers on
>    a US key layout where '?' requires shift.
>    - High-value space such as M-* and C-*
[...]
> It was suggested that advice might work for implementation, up to a point,
> since define-key doesn't have a dedicated code of some type I'm unaware of.

Doing it inside `define-key` is problematic because you can bind a key
to `C-a C-b C-c` via three calls to `define-key`, so you won't be able
to detect the problem reliably in all cases:

    (let* ((map1 (make-sparse-keymap))
           (map2 (make-sparse-keymap))
           (map3 (make-sparse-keymap)))
      (define-key map1 [?\C-a] map2)
      (define-key map2 [?\C-b] map3)
      (define-key map3 [?\C-c] 'foo))


-- Stefan




reply via email to

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