all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How does one use a macro in a special form?
@ 2003-06-28 13:23 Alan Mackenzie
  2003-06-28 18:00 ` Daniel Jensen
  2003-06-29 12:39 ` Kai Großjohann
  0 siblings, 2 replies; 5+ messages in thread
From: Alan Mackenzie @ 2003-06-28 13:23 UTC (permalink / 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").

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-06-29 13:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2003-06-29 12:39 ` Kai Großjohann
2003-06-29 13:07   ` Daniel Jensen

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.