[Top][All Lists]

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

Re: How to put this in a macro

From: Barry Margolin
Subject: Re: How to put this in a macro
Date: Tue, 04 May 2010 15:45:04 -0000
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article 
 José A. Romero L. <address@hidden> wrote:

> On 17 Kwi, 13:40, Cecil Westerhof <address@hidden> 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?).

Another reason why his version should be a function.

Barry Margolin, address@hidden
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***

reply via email to

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