unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Cc: Tassilo Horn <tsdh@gnu.org>
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	[thread overview]
Message-ID: <jwvo7w6zr8u.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20220826200639.2B668C00889@vcs2.savannah.gnu.org> (Tassilo Horn's message of "Fri, 26 Aug 2022 16:06:39 -0400 (EDT)")

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	other threads:[~2022-08-26 20:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <166154439039.10036.933483657788018296@vcs2.savannah.gnu.org>
     [not found] ` <20220826200639.2B668C00889@vcs2.savannah.gnu.org>
2022-08-26 20:28   ` Stefan Monnier [this message]
2022-08-26 20:47     ` [elpa] externals/auctex cb0a1e6be1 72/77: Improve function calls to retrieve key=vals in style hooks Tassilo Horn
2022-08-26 21:15       ` Stefan Monnier
2022-08-26 21:17         ` Tassilo Horn
2022-08-27  7:19       ` Arash Esbati
2022-08-27  7:25         ` Tassilo Horn
2022-08-29 19:34           ` Arash Esbati
2022-08-30  5:33             ` TeX-arg-key-val syntax and let go of eval (was: [elpa] externals/auctex cb0a1e6be1 72/77: Improve function calls to retrieve key=vals in style hooks) Tassilo Horn
2022-08-26 22:51     ` [elpa] externals/auctex cb0a1e6be1 72/77: Improve function calls to retrieve key=vals in style hooks Emanuel Berg
2022-08-28  4:04     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvo7w6zr8u.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=tsdh@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).