From: Alan Mackenzie<none@example.invalid>
Subject: Re: How does one use a macro in a special form?
Date: Sat, 28 Jun 2003 18:17:36 +0000 [thread overview]
Message-ID: <04mkdb.1j.ln@acm.acm> (raw)
In-Reply-To: 863chuqdyn.fsf@bigwalter.net
Daniel Jensen <daniel-news@bigwalter.net> wrote on Sat, 28 Jun 2003
20:00:48 +0200:
> Alan Mackenzie<none@example.invalid> writes:
>> In particular, I want to use a macro acm-indent++ within a let (or let*),
> You can't. Let is a special form and does not follow conventional
> evaluation rules.
>> The macro acm-indent++ looks like this:
>>
>> (defmacro acm-indent++ ()
>> "Increase the level of indentation in an acm-printf output by binding indent-spaces.
>> This form must appear \"comma\"d in a let/let* variable list."
>> `(indent-spaces (concat indent-spaces " ")))
> Use something like this instead:
> (defmacro with-extra-indent-spaces (&rest body)
> `(let ((indent-spaces (concat indent-spaces " ")))
> ,@body))
> (let (...)
> (with-extra-indent-spaces
> ...))
>> Question: does the "," operator have meaning when not within a
>> backquote expression?
> No. Then it's just a character. It is only an "operator" inside
> backquoted forms.
Many thanks for the chrystal clear answers. I think for this thing, I'll
just write out the indent-spaces thing in longhand each time I need it.
> Daniel Jensen
--
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").
next prev parent reply other threads:[~2003-06-28 18:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-28 13:23 How does one use a macro in a special form? Alan Mackenzie
2003-06-28 18:00 ` Daniel Jensen
2003-06-28 18:17 ` Alan Mackenzie [this message]
2003-06-29 12:39 ` Kai Großjohann
2003-06-29 13:07 ` Daniel Jensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=04mkdb.1j.ln@acm.acm \
--to=none@example.invalid \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.