all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Jensen <daniel-news@bigwalter.net>
Subject: Re: How does one use a macro in a special form?
Date: Sat, 28 Jun 2003 20:00:48 +0200	[thread overview]
Message-ID: <863chuqdyn.fsf@bigwalter.net> (raw)
In-Reply-To: at4kdb.r5.ln@acm.acm

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.

-- 
Daniel Jensen
Editing is a rewording activity.

  reply	other threads:[~2003-06-28 18:00 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 [this message]
2003-06-28 18:17   ` Alan Mackenzie
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=863chuqdyn.fsf@bigwalter.net \
    --to=daniel-news@bigwalter.net \
    --cc=daniel@bigwalter.net \
    /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.