Kent M Pitman <email@example.com> wrote:
| Tim Bradshaw <firstname.lastname@example.org> writes:
| > And in this case you almost certainly will not need the EVAL-WHEN,
| > either: DEFINE-THING will expand to code which refers to *THINGS*, but
| > this code will not actually run until the file is loaded, when
| > *THINGS* and the utility functions will be defined in the normal way.
| The usual case is that an EVAL-WHEN is needed in the expansion if you plan
| to use the macro you're defining later in the same file and not otherwise.
I've found that in order to compile-file files that REQUIRE other
compiled macro-containing modules, I have to wrap the REQUIREs in
EVAL-WHEN. For example, the prolog for my CGI-SQL module (that supports
CGI scripting in either CMUCL or CLISP) that uses Tim Bradshaw's HTOUT
macros & Eric Marsden's POSTGRESQL macros (except on CLISP, where for
now I'm still using the PostgreSQL binding bundled into the distribution)
had to be this to get it to compile:
(eval-when (:compile-toplevel :load-toplevel :execute) ; for the macros
#-clisp ; May be removed later if move to PG for CLISP, too.
(:use :cl :ext :htout #-clisp :pg)
#+clisp ; conflicts with CLISP's EXT
(:shadowing-import-from :htout #:with-html-output)
(:export #:sql-result-html-table ; (sql-result &key stream callback)
#:list-html-table ; (lists &key stream callback)
Am I missing something obvious that would let me omit the EVAL-WHEN?
Rob Warnock, PP-ASEL-IA <email@example.com>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607