emacs-devel
[Top][All Lists]
Advanced

[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 14:19:24 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

"Herbert Euler" <address@hidden> writes:

> By the way, if I want my Emacs Lisp program able to be successfully
> compiled, shall macros in the program "finite"?  For example, the
> following macro can't be compiled, can it?
>
> (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))
>
> Is there some way of making it able to be compiled?

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))


-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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