Subject: Re: bug#27584: 26.0.50; alist-get: Add optional arg TESTFN

From: Tino Calancha <[email-masked]>
Date: Mon, 10 Jul 2017 21:28:21 +0900 (JST)

On Mon, 10 Jul 2017, Michael Heerdegen wrote:

> Tino Calancha <[email-masked]> writes:
>
>> But we know that:
>> (macroexp-const-p (let ((x 999)) x))
>> => t
>
> Aren't you just missing a quote before the expression?
That's right, the compiler macro see '(let ((x 999))
that explains my example:
(macroexp-const-p '(let ((x 999)) x))
=> nil

I am a bit fooled by the docstring of `macroexp-const-p'.
"Return non-nil if EXP will always evaluate to the same value."

Consider the expression:
(setq exp '(let ((x 999)) x))

This will always be evaluated to 999:
(eval exp)
=> 999

Then, I would expect `macroexp-const-p' return non-nil
on this expressio, but it doesn't.