|
From: | Clément Pit-Claudel |
Subject: | Re: A combination of defmacro, functionp, and quoted lambdas yields different results on consecutive evaluations |
Date: | Mon, 26 Feb 2018 12:40:36 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
On 2018-02-26 12:32, Clément Pit-Claudel wrote: > I find it especially confusing that eval-after-load bypasses the quote. Looks like it wasn't always like that; eval-after-load's behavior was changed in 2013: commit de0503df97a507a523a192e877a8d5c7439c4846 Author: Stefan Monnier <address@hidden> Date: Thu Jun 13 18:24:52 2013 -0400 * lisp/subr.el (with-eval-after-load): New macro. (eval-after-load): Allow form to be a function. take advantage of lexical-binding. (do-after-load-evaluation): Use dolist and adjust to new format. * lisp/simple.el (bad-packages-alist): Use dolist and with-eval-after-load. * doc/lispref/loading.texi (Hooks for Loading): Document with-eval-after-load instead of eval-after-load. Don't document after-load-alist. * src/lread.c (syms_of_lread): * src/fns.c (Fprovide): Adjust to new format of after-load-alist. That code added a (declare (compiler-macro …)) form to eval-after-load, which says ';; Quote with lambda so the compiler can look inside'. Was the change in behavior intended? Without that 'declare' form, eval-after-load doesn't look into its argument and makes it easy to delay the interpretation of a snippet until a file is loaded. Clément.
[Prev in Thread] | Current Thread | [Next in Thread] |