[Openmcl-devel] Unexpected change of package
Gary Byers
gb at clozure.com
Wed Dec 7 08:51:08 PST 2011
The documentation (section 18.2) notes the "... bizarre behavior" of these
functions "with respect to the special variables they affect" without fully
decribing that behavior. They mess around with the internals of the special
binding mechanism so that they can be used in contexts where those special
variables are bound dynamically, e.g., LOAD.
You're seeing that bizarre behavior. It's intentional.
On Wed, 7 Dec 2011, Waldek Hebisch wrote:
> Consider the following session:
>
> ? hebisch at hera:~/kompi/axp91$ /home/n/k/hebisch/kompi/lisp/ccl-1.7/scripts/ccl64
> Welcome to Clozure Common Lisp Version 1.7-r14925M (LinuxX8664)!
> ? (load "foo.lsp")
> #P"/home/n/k/hebisch/kompi/axp91/foo.lsp"
> ? (in-package "KEYWORD")
> #<Package "KEYWORD">
> ? (common-lisp-user::foo)
> :NO-TEXT
> ? *PACKAGE*
> #<Package "COMMON-LISP-USER">
>
>
> where "foo.lsp" is:
>
> (defun foo()
> (let ((*PACKAGE* *PACKAGE*))
> (CCL::SET-DEVELOPMENT-ENVIRONMENT t)
> (CCL::SET-USER-ENVIRONMENT t)))
>
>
> If I use other operations that change *PACKAGE* then modified version
> of 'foo' correctly restores value of *PACKAGE*, however
> SET-DEVELOPMENT-ENVIRONMENT and SET-USER-ENVIRONMENT are somewhat
> special and *PACKAGE* is not restored...
>
> --
> Waldek Hebisch
> hebisch at math.uni.wroc.pl
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>
More information about the Openmcl-devel
mailing list