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: Eli Zaretskii
Subject: Re: Moving kbd to subr.el
Date: Thu, 14 Oct 2021 14:56:53 +0300

> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Thu, 14 Oct 2021 04:50:31 -0700
> Cc: larsi@gnus.org, emacs-devel@gnu.org
> 
> > No NEWS entry?
> 
> I consider this as an internal change that should have no user impact.
> So I'm not sure this needs a NEWS-entry; if you think it does, please
> clarify what you think we should put in it.

Using kbd no longer needs to require edmacro, so it isn't entirely
internal.

> > No sure I understand: the rationale for introducing internal--kbd
> > instead of using kbd directly is because we need an extra optional
> > argument?  if so, why not add that argument to kbd itself?
> 
> We could, but I feel like that's an implementation detail: an artifact
> of the fact that kbd and edmacro-parse-keys share code.  I don't think
> the parameter will be useful to users of kbd, and therefore risks
> confusing instead.  So adding a new internal function seemed like a
> small price to pay.
> 
> I have added this comment to the beginning of the function to make the
> reasoning clear:
> 
>   ;; NB. This function exists mainly to avoid adding a "need-vector"
>   ;;     argument to the user-facing function `kbd'.

That sounds less clean than I'd like it to be, FWIW.  Having a trivial
wrapper in our own code just to avoid an optional argument?

Lars, WDYT?



reply via email to

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