Subject: Re: symbol in macro
From: Erik Naggum <erik@naggum.no>
Date: 31 Aug 2002 10:36:22 +0000
Newsgroups: comp.lang.lisp
Message-ID: <3239778982119441@naggum.no>

* cubicle584@mailandnews.com (Software Scavenger)
| Whatever package the macro is expanded in, it expects to find a specific
| symbol in that package.  It can't simply refer to it directly, because it
| doesn't know what package it's in until it's expanded.

  This sounds like a conceptual mistake of some kind, but if you really want
  to reference a symbol by name in the current package at the time of the
  expansion, something like this should help you get started.

(defmacro ...
  (let ((symbol (intern (symbol-name 'symbol) *package*)))
    `(... ,symbol ...))

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.