GNU bug report logs - #27584
26.0.50; alist-get: Add optional arg TESTFN

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Wed, 5 Jul 2017 03:24:02 UTC

Severity: wishlist

Found in version 26.0.50

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Tino Calancha <tino.calancha <at> gmail.com>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: Nicolas Petton <nicolas <at> petton.fr>, 27584 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>, Tino Calancha <tino.calancha <at> gmail.com>
Subject: bug#27584: 26.0.50; alist-get: Add optional arg TESTFN
Date: Mon, 10 Jul 2017 21:28:21 +0900 (JST)

On Mon, 10 Jul 2017, Michael Heerdegen wrote:

> Tino Calancha <tino.calancha <at> gmail.com> 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.




This bug report was last modified 7 years and 353 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.