help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About `setf' with macro call


From: Tassilo Horn
Subject: Re: About `setf' with macro call
Date: Wed, 17 Apr 2013 17:14:48 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> ELISP> (macroexpand '(setf (wrong-order A B) 17))
>> (let*
>>     ((v B)
>>      (v A))
>>   (aset v v 17))
>> --8<---------------cut here---------------end--------------->8---
>
>> Now that explains the let* in the backtrace, but the setf-expansion
>> looks totally wrong!  v is set to B (the index) and then overridden by A
>> (the array).
>
> Actually, no: try (setq print-gensym t) to see the full story.

Argh, it's not the first time I've fallen into that trap.  It happens so
rarely that at the Nth time I've usually forgotten about the N-1th time
and its explanation. ;-)

So now I've eventually put

  (setq print-gensym t
        print-circle t)

in my ~/.emacs, so hopefully I won't be caught another time.

Thanks,
Tassilo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]