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

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

Re: How does one use a macro in a special form?


From: Kai Großjohann
Subject: Re: How does one use a macro in a special form?
Date: Sun, 29 Jun 2003 14:39:44 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Alan Mackenzie<address@hidden> writes:

> In particular, I want to use a macro acm-indent++ within a let (or let*),
> something like this:
>
> (let ((a a-binding)
>       (b b-binding)
>       ,(acm-indent++))
>   FORMS)

You could write a macro that allows you to say

    (with-acm-indent++
      (let ((a a-binding)
            (b b-binding))
        FORMS))

Something like this might work:

(defmacro with-acm-indent++ (&rest body)
  `(let ((indent-spaces (concat indent-spaces "    ")))
     ,body))

I haven't tested it, but maybe you get the idea.
-- 
~/.signature


reply via email to

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