[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#55137: Different result when interpreted and when evaluating byte-co
From: |
Phil Sainty |
Subject: |
bug#55137: Different result when interpreted and when evaluating byte-compiled code |
Date: |
Wed, 27 Apr 2022 23:20:41 +1200 |
User-agent: |
Orcon Webmail |
On 2022-04-27 10:16, Paul Pogonyshev wrote:
(defmacro is-special-as-macro ()
(special-variable-p 'special-variable))
This macro does not expand to code which calls `special-variable-p'.
Rather it calls `special-variable-p' at expansion time, and expands
to the return value of that call (nil or t).
If you byte-compile your code without loading it, then your would-be
`special-variable' doesn't exist, and hence your macro was expanding
to nil rather than t.
Try this:
(defmacro is-special-as-macro ()
'(special-variable-p 'special-variable))
-Phil