all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie<none@example.invalid>
Subject: How does one use a macro in a special form?
Date: Sat, 28 Jun 2003 13:23:53 +0000	[thread overview]
Message-ID: <at4kdb.r5.ln@acm.acm> (raw)

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)

and I want it to expand to this:

(let ((a a-binding)
      (b b-binding)
      (indent-spaces (concat indent-spaces "    ")))
  FORMS)

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 "    ")))

Thus far, I'm having no luck with it, the value of indent-spaces
remaining unchanged within the let form.

Question:  does the "," operator have meaning when not within a backquote
expression?

Is it possible to do what I want to do, and if so, how do I go about it?

Thanks in advance for any help!

-- 
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").

             reply	other threads:[~2003-06-28 13:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-28 13:23 Alan Mackenzie [this message]
2003-06-28 18:00 ` How does one use a macro in a special form? Daniel Jensen
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=at4kdb.r5.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.