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

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

Re: Difficult macro question: Doing custom `let'


From: Barry Margolin
Subject: Re: Difficult macro question: Doing custom `let'
Date: Mon, 18 Aug 2003 17:57:21 GMT

In article <address@hidden>,
Jari Aalto+mail.emacs <address@hidden> wrote:
>I'm trying to make a custom `let' macro. The basic idea is that
>the variables defined inside `let' should be user defined and
>the `let' form simply should set them to nil. Something like:
>
>(setq list '(a b c))
>
>Something, a macro, that turns that into:
>
>   (let (a
>         b
>         b)

(defmacro my-let (symbols &rest body)
  `(progv ,symbols ,(make-list (length symbols) nil)
     ,@body))

-- 
Barry Margolin, address@hidden
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


reply via email to

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