[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Moving kbd to subr.el
From: |
Eli Zaretskii |
Subject: |
Re: Moving kbd to subr.el |
Date: |
Wed, 13 Oct 2021 15:31:07 +0300 |
> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Tue, 12 Oct 2021 20:18:20 -0700
> Cc: emacs-devel@gnu.org
>
> I've attached a quick proof-of-concept of moving the kbd implementation
> to subr.el. With this, all the tests I have assembled so far pass and
> this bootstraps. It was mostly just a case of ripping out the calls to
> cl-lib functions.
>
> If this is something we want to do, I can finish this patch up.
Can we agree that if and when this lands, we will NOT start a deluge
of converting all the key bindings in core to the kbd format? Let's
agree that, at least as a rule, this is only for new additions to key
bindings, okay?
> - (should (equal (kbd "C-x a") "\C-xa"))
> +
> + ;; Modifiers.
> + (should (equal (kbd "C-x a") "\^Xa"))
> + (should (equal (kbd "M-x a") [134217848 97]))
> + (should (equal (kbd "H-x a") [16777336 97]))
> + (should (equal (kbd "s-x a") [8388728 97]))
> + (should (equal (kbd "S-x a") [33554552 97]))
Isn't this a bit ad-hoc? E.g., why did you change the "C-x a" result?
Also, for easier readability and (no less important) write-ability,
how about using this format instead:
(should (equal (kbd "S-x a") (vector (+ #x2000000 ?x) ?a)))
Thanks.
- Re: master 859190f 2/3: Convert some keymaps to defvar-keymap, (continued)
- Re: master 859190f 2/3: Convert some keymaps to defvar-keymap, Stefan Kangas, 2021/10/12
- Re: master 859190f 2/3: Convert some keymaps to defvar-keymap, Lars Ingebrigtsen, 2021/10/12
- Re: master 859190f 2/3: Convert some keymaps to defvar-keymap, Stefan Kangas, 2021/10/12
- Re: master 859190f 2/3: Convert some keymaps to defvar-keymap, Lars Ingebrigtsen, 2021/10/12
- Re: master 859190f 2/3: Convert some keymaps to defvar-keymap, Lars Ingebrigtsen, 2021/10/12
- Re: master 859190f 2/3: Convert some keymaps to defvar-keymap, Stefan Kangas, 2021/10/12
- Re: master 859190f 2/3: Convert some keymaps to defvar-keymap, Lars Ingebrigtsen, 2021/10/12
- Re: master 859190f 2/3: Convert some keymaps to defvar-keymap, Lars Ingebrigtsen, 2021/10/12
- Moving kbd to subr.el, Stefan Kangas, 2021/10/12
- Re: Moving kbd to subr.el, Lars Ingebrigtsen, 2021/10/13
- Re: Moving kbd to subr.el,
Eli Zaretskii <=
- Re: Moving kbd to subr.el, Stefan Monnier, 2021/10/13
- Re: Moving kbd to subr.el, T.V Raman, 2021/10/13
- Re: Moving kbd to subr.el, Stefan Kangas, 2021/10/13
- Re: Moving kbd to subr.el, Stefan Kangas, 2021/10/13
- Re: Moving kbd to subr.el, T.V Raman, 2021/10/13
- Re: Moving kbd to subr.el, T.V Raman, 2021/10/13
- Re: Moving kbd to subr.el, Stefan Kangas, 2021/10/13
- Re: Moving kbd to subr.el, Eli Zaretskii, 2021/10/13
- Re: Moving kbd to subr.el, Stefan Kangas, 2021/10/13
- Re: Moving kbd to subr.el, Stefan Kangas, 2021/10/13