[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with eval-when/shadowing-import



Bruno Haible wrote in September:

 > > (shadowing-import 'language:data)

 >   CLISP, according to CLtL2's description of `eval-when', first evaluates
 >   the form and then emits code for it. However, by doing the shadowing-import,
 >   you changed the code that is emitted.
Precisely.  I had this problem in one of our systems package
definition files and for the sake of compilation and reloadability
(what a new word :-), I replaced the use of symbols with forms like

	(shadowing-import (intern "DATA" "LANGUAGE"))

Otherwise, when you reload the file or compile it after its source
form has already been loaded, CLISP (more precisely its symbol print
routine) will write DATA to the .fas file and not LANGUAGE:DATA, for
the symbol has already been imported and the printer has no reason to
use colon prefix syntax anymore.

Yet another reason to use defpackage (which uses all strings).  I once
copied CLISP's defpackage macro to (Un)Golden Common Lisp for this
very reason (very few modifications needed).

	Jo"rg Ho"hle.
Joerg.Hoehle@gmd.de		http://zeus.gmd.de/~hoehle/amiga-clisp.html