unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Psionic K <psionik@positron.solutions>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: Delegating user-reserved key binding space definition to users
Date: Mon, 21 Nov 2022 14:37:07 -0500	[thread overview]
Message-ID: <jwv4jusyuu7.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CADQMGARU64KQ=ve=_MbYdtMz0=_SvoxeRbkvNkwCOsbTkt=6kA@mail.gmail.com> (Psionic K.'s message of "Mon, 21 Nov 2022 08:40:58 -0600")

>    - 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	other threads:[~2022-11-21 19:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-21 14:40 Delegating user-reserved key binding space definition to users Psionic K
2022-11-21 19:37 ` Stefan Monnier [this message]
2022-11-22  2:07   ` Phil Sainty
2022-11-25  2:48     ` Psionic K
2022-11-25  3:31       ` Ihor Radchenko
2022-11-25 13:53         ` xenodasein--- via Emacs development discussions.
2022-11-25 15:16       ` Stefan Monnier
2022-11-26  6:44         ` Ihor Radchenko
2022-11-26 17:29           ` Stefan Monnier
2022-11-27  5:45             ` Ihor Radchenko
2022-11-27 11:26               ` Psionic K
2022-11-27 11:53                 ` Psionic K
2022-11-28 18:15               ` Stefan Monnier
2022-11-28 18:37                 ` Eli Zaretskii
2022-11-29  2:38                 ` Psionic K
2022-11-29  4:01                   ` Stefan Monnier
2022-11-29  5:22                     ` Psionic K
2022-11-29 13:03                       ` Eli Zaretskii
2022-11-30  6:23                         ` Psionic K
2022-11-30  9:01                           ` xenodasein--- via Emacs development discussions.
2022-11-30 13:44                           ` Eli Zaretskii
2022-11-29 11:54                 ` John Yates

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv4jusyuu7.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=psionik@positron.solutions \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).