emacs-devel
[Top][All Lists]
Advanced

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

Re: Moving kbd to subr.el


From: Stefan Kangas
Subject: Re: Moving kbd to subr.el
Date: Wed, 13 Oct 2021 14:50:12 +0200

Eli Zaretskii <eliz@gnu.org> writes:

> > 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?

Yeah, I don't think converting them en masse sounds worth doing.  It
needs care in every case, and specific testing, or you will risk
introducing bugs.

> > -  (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?

I don't think I see what has changed.  This is what I get in Emacs 27.2:

    (kbd "C-x a")
    " ^Xa"

If I did my job right, nothing will have changed as this should just
be a straight conversion from CL-Lib to ELisp.  I might have made a
mistake somewhere, of course, and as I said I didn't look it over for
correctness in much detail yet.



reply via email to

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