emacs-devel
[Top][All Lists]
Advanced

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

Re: [elpa] externals/auctex cb0a1e6be1 72/77: Improve function calls to


From: Stefan Monnier
Subject: Re: [elpa] externals/auctex cb0a1e6be1 72/77: Improve function calls to retrieve key=vals in style hooks
Date: Fri, 26 Aug 2022 16:28:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Tassilo Horn [2022-08-26 16:06:39] wrote:
>     Improve function calls to retrieve key=vals in style hooks
>     
>     * latex.el (TeX-read-key-val): Improve call of functions as
>     argument of `TeX-arg-key-val' inside style hooks.
[...]
>                 (fboundp (car key-val-alist)))
> -          (let ((head (car key-val-alist))
> -                (tail (cdr key-val-alist)))
> -            (apply head tail)))
> +          (if (> (length key-val-alist) 1)
> +              (eval key-val-alist t)
> +            (funcall (car key-val-alist))))
>           (t

FWIW, replacing `apply` with `eval` is not an "Improve"ment in my
book :-) It means now that `key-val-alist` contains code represented as
data (i.e. code to which flymake, the compiler, the eager macroexpander,
etc... don't have access) whereas it previously only contains values
(which can't contain code that needs macroexpansion, for example).


        Stefan




reply via email to

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