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 17:15:47 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> be just as good?  I guess no because IIRC the context was that alist1
> and alist2 might be populated dynamically (by parsing the document) so
> we need to take the values at the time the \bar macro is inserted.  So
> probably
>
>   (TeX-add-style-hook
>    "foo"
>    (lambda ()
>      (TeX-add-symbols
>       `("bar" (TeX-arg-key-val ,(lambda () (append alist1 alist2)))))))
>
> would be the right thing which works without eval, right?  It's a bit
> longer but I wouldn't mind.  Wrapping code in a lambda to be evaluated
> later is a common concept.

FWIW, I don't understand exactly how the above code is "linked" to the
definition of `TeX-arg-key-val` (which in my code takes two arguments
rather than one).
I tried to trace through the code, but it's a bit less obvious than
needed for my little head.


        Stefan




reply via email to

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