[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Moving kbd to subr.el
From: |
Juri Linkov |
Subject: |
Re: Moving kbd to subr.el |
Date: |
Mon, 18 Oct 2021 19:01:05 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
> Can't we impose pretty much any syntax we like in new forms, such as
> 'defvar-keymap' and 'kbd-valid-p'?
>
> I'm looking at a fragment like this:
>
> "P" #'cvs-status-prev
> - (kbd "M-n") #'cvs-status-next
> - (kbd "M-p") #'cvs-status-prev
> + ["M-n"] #'cvs-status-next
> + ["M-p"] #'cvs-status-prev
> "t" #'cvs-status-cvstrees
>
> And I feel like it would be nice if we could avoid putting these
> strings in a vector. Especially if we don't do it consistently.
It would be perfect if new defvar-keymap would use kbd-strict syntax.
Then replacing define-key with define-keymap will also replace
the string syntax - safely, and as we already discussed allowing
old syntax optionally by using a keyword like ':kbd nil'.
> At the same time, maybe I don't understand the overreaching plan. Is
> the idea to be able to replace any use of (kbd "M-x") with ["M-x"]
> everywhere, including in 'define-key' et al?
Any use of (kbd "M-x") can't be replaced with ["M-x"].
For example, this use from (info "(elisp) Functions for Key Lookup")
(lookup-key (current-global-map) (kbd "C-x C-f"))
can't be replaced with:
(lookup-key (current-global-map) ["C-x C-f"])
- RE: [External] : Making a key undefined again, (continued)
- RE: [External] : Making a key undefined again, Drew Adams, 2021/10/25
- Re: Making a key undefined again, Lars Ingebrigtsen, 2021/10/25
- Re: Making a key undefined again, Stefan Monnier, 2021/10/25
- Re: Making a key undefined again, Gregory Heytings, 2021/10/25
- Re: Making a key undefined again, Jonas Bernoulli, 2021/10/25
- Re: Making a key undefined again, Jonas Bernoulli, 2021/10/25
- Re: Making a key undefined again, Stefan Monnier, 2021/10/25
- Re: Making a key undefined again, Gregory Heytings, 2021/10/25
- Re: Making a key undefined again, Jonas Bernoulli, 2021/10/26
- Re: Making a key undefined again, Stefan Monnier, 2021/10/26
- Re: Moving kbd to subr.el,
Juri Linkov <=
- Re: Moving kbd to subr.el, Gregory Heytings, 2021/10/18
- Re: Moving kbd to subr.el, Lars Ingebrigtsen, 2021/10/18
- Re: Moving kbd to subr.el, T.V Raman, 2021/10/17
- Re: Moving kbd to subr.el, Eli Zaretskii, 2021/10/18
- Re: Moving kbd to subr.el, Andreas Schwab, 2021/10/14
- Re: Moving kbd to subr.el, Stefan Kangas, 2021/10/14
- Re: Moving kbd to subr.el, Andreas Schwab, 2021/10/14
- Re: Moving kbd to subr.el, Lars Ingebrigtsen, 2021/10/14
- Re: Moving kbd to subr.el, Andreas Schwab, 2021/10/14
- Re: Moving kbd to subr.el, Stefan Kangas, 2021/10/14