GNU bug report logs -
#14422
Apply eager-macroexpansion everywhere (eval-region, ...)
Previous Next
Reported by: Achim Gratz <Stromeko <at> nexgo.de>
Date: Sun, 19 May 2013 14:28:01 UTC
Severity: minor
Tags: moreinfo
Found in version 24.3
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Stefan Monnier writes:
> I see the test fails, but that's just because the test is wrong.
[…]
> You'll see that your code behaves differently when byte-compiled.
Yes, we've already established that the original code itself had a bug.
The correct code would look like this
[eme.el (text/x-emacs-lisp, inline)]
(defvar eme-ll nil)
(defmacro one (p)
`(progn (push ',p eme-ll)))
(defmacro two (p)
`(let ((pp (append eme-ll ',p)))
(progn (push pp eme-ll))))
(provide 'eme)
[Message part 3 (text/plain, inline)]
The remaining point is that the ERT test still fails in exactly the same
way when it is _not_ byte-compiled and batch-tested (like the original
case in Org), but it produces the correct result when testing in
interactive mode or in the debugger. I guess I'm asking for a warning
for recursive macro expansions that manipulate the same variable both at
expansion and at runtime in separate macros. Alternatively if the buggy
code would always fail in the same way that would at least ensure it can
be found more easily.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables
This bug report was last modified 4 years and 278 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.