[Top][All Lists]

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

Re: Macro vs Function

From: David Kastrup
Subject: Re: Macro vs Function
Date: Wed, 12 Apr 2006 15:52:16 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Herbert Euler" <address@hidden> writes:

>>From: David Kastrup <address@hidden>
>>To: "Herbert Euler" <address@hidden>
>>CC: address@hidden
>>Subject: Re: Macro vs Function
>>Date: Wed, 12 Apr 2006 14:19:24 +0200
>>By not mixing up what you do when?
>>(defmacro xgp-casi2-safe-call-iter (func largs)
>>  (if largs
>>      `(condition-case nil
>>         (apply ,func ,(car largs))
>>       (error (xgp-casi2-safe-call-iter ,func ,(cdr largs))))
>>    'nil))
> Hmm...  The correct one should be:
> (defmacro xgp-casi2-safe-call-iter (func largs)
>  (if largs
>      `(condition-case nil
>           (apply ,func ,((lambda (a) `(quote ,(car a))) largs))
>         (error (xgp-casi2-safe-call-iter ,func ,(cdr largs))))
>    'nil))
> Only ,(car largs) is not sufficient.

Oh good grief.  What _are_ you trying to accomplish?  What you wrote
above is a complete and utter contorted mess.

So please come up with an actual _example_ of what you intend the
stuff to do.  I'd be surprised if my proposal would not be closer to
doing the intended thing than what you wrote.

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

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