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

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

Re: How to put this in a macro


From: José A . Romero L .
Subject: Re: How to put this in a macro
Date: Tue, 04 May 2010 15:45:04 -0000
User-agent: G2/1.0

On 17 Kwi, 13:40, Cecil Westerhof <Ce...@decebal.nl> wrote:
(...)
>            (if (> (symbol-value ,start-sym) (symbol-value ,end-sym))
>                (let ((temp (symbol-value ,start-sym)))
>                  (set ,start-sym (symbol-value ,end-sym))
>                  (set ,end-sym   temp)))))
>
> I also make sure now that start is not after end.
(...)

Hmm, be careful with lets inside macros - this will work OK until one
of the variables you try to set is named precisely "temp" (no lexical
scope, remember?).

Cheers,
--
José A. Romero L.
escherdragon at gmail
"We who cut mere stones must always be envisioning cathedrals."
(Quarry worker's creed)



reply via email to

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