emacs-devel
[Top][All Lists]
Advanced

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

Re: master f515d658e5 1/2: Don't quote numbers in byte-run--set-*


From: Stefan Monnier
Subject: Re: master f515d658e5 1/2: Don't quote numbers in byte-run--set-*
Date: Sun, 19 Jun 2022 18:24:02 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> FWIW, the goal wasn't to avoid an `if` but to allow an
>> arbitrary expression.  But I agree the gain is minuscule.
> Perhaps we should have a quote-if-not-self-quoting function for these
> things?

We do, it's called `macroexp-quote`, but that does the same as your
`if`, i.e. it does not change the semantics but just optimizes away the
`quote` when it doesn't make a difference.  Also we probably wouldn't
want to use it here because `macroexp-quote` is defined much too late
in the bootstrap (or we'd have to move it first).

My proposal was to change the semantics, rather than to "avoid if".
According to it,

    (declare (doc-string (foo bar)))

would actually set `doc-string-elt` to the return value of calling (foo
bar) rather than setting it to the list `(foo bar)`.


        Stefan




reply via email to

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