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: Gregory Heytings
Subject: Re: Moving kbd to subr.el
Date: Tue, 19 Oct 2021 07:48:02 +0000


The old string syntax for keys just sucks and we should work towards its reduction, even if it will stay with us for the foreseeable future.

I totally agree that the old string syntax for keys sucks, but there is no realistic way to phase it out. `kbd' was a nice attempt, but it's not attractive enough as is. My hope is that the new syntax (which gives you actual error messages if you do something wrong and stuff) will spur conversion.


I'm puzzled. There is a way to phase it out, in fact this was one of the (two) explict goals of my proposal, and it was also the reason why you rejected it. What am I misunderstanding?

This thread is rather long, so for those who did not read all its posts, this is what my proposal is:

Emacs 29: allow both syntaxes (kbd and old) in strings; these syntaxes are different and can be distinguised programmatically (with very few exceptions, namely someone who would use e.g. "C-o" to mean "C - o" or "a b" to mean "a SPC b").

Emacs 29 + N: allow both syntaxes (kbd and old), but display a warning when the old syntax is used (mentioning what the new syntax should be), and possibly (if for some reason the old syntax is necessary in some cases) introduce a new specific syntax for it (e.g. "{\C-ca}").

Emacs 29 + 2*N: allow only the kbd syntax, display an error otherwise.

Sure, this could break some configurations and some old code, but not more than when the cl- prefix was added to the cl-lib library, or to take a more recent (current) example when xref switched from eieio to cl-defstruct. And unlike these examples the fix is in each case as simple as possible.



reply via email to

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