emacs-devel
[Top][All Lists]
Advanced

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

Re: 29.0.60; keymap-local-set and keymap-global-set became less strict


From: Eli Zaretskii
Subject: Re: 29.0.60; keymap-local-set and keymap-global-set became less strict
Date: Wed, 01 Feb 2023 15:50:02 +0200

> Date: Wed, 1 Feb 2023 14:13:25 +0100
> Cc: larsi@gnus.org, emacs-devel@gnu.org, monnier@iro.umontreal.ca
> From: Daniel Mendler <mail@daniel-mendler.de>
> 
> > Unless anyone else objects, please install this in a day or two.
> 
> I object. With this change the non-interactive implementation is
> polluted with an unnecessary INTERACTIVE argument

It's an optional argument, so I fail to see how is that "pollution".

> which would then
> allow the non-interactive caller to still pass vector arguments.

So?  A malevolent enough programmer could replace
keymap-global/local-set with an implementation that performs the
conversion unconditionally, so the danger of someone hanging
themselves with the rope Emacs gives them always exists.  This
function is supposed to help those who _want_ such problems to be
caught, it isn't supposed to make Emacs a high-security prison,
because that's simply impossible in Emacs.

> Why can you not just move the whole conversion business into the
> `interactive' form? This means we cannot use a string as interactive
> form but we have to implement our own `keymap--read` function which is
> then used like this: `(interactive (list (keymap--read ...) ...))`. It
> is not as concise as the string form but would avoid any problems.

Excuse me, but that's the tail wagging the dog.  Please be reasonable,
we want a change that is simple and safe enough to go into Emacs 29,
because currently those functions are completely useless as
interactive commands, and we want them to become the mainstay of
binding keys interactively.

> As better alternative we could also go with Stefan's proposal to allow
> vectors as arguments in the first place.

Over Lars's disagreement?  I don't want to do that, with all due
respect to Stefan, certainly not on emacs-29.



reply via email to

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