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

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

Re: (list) and '(list)


From: Pascal Bourguignon
Subject: Re: (list) and '(list)
Date: Fri, 27 Apr 2007 13:05:56 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

Kai Grossjohann <kai@emptydomain.de> writes:
> For example, to reverse the condition of `if' (proof of concept only,
> not production code):
>
> (defmacro ifnot (test no yes)
>   (if (not test) no yes))

(defmacro ifnot (test no yes)
  `(if (not ,test) ,no ,yes))

or better:

(defmacro ifnot (test no yes)
   `(if ,test ,yes ,no))  ; ...


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

This is a signature virus.  Add me to your signature and help me to live.


reply via email to

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