Discussion:
Bug: Special variables in compiled files
Marco Gidde
2004-06-08 07:43:57 UTC
Permalink
Hi,

when I compile the code snippet below and try to load it into a fresh
environment, emacs-cl complains that the package "TEST" can't be
found. It seems that the compiler places the definition/interning of
special variables right at the beginning of the *.elc file, even
before the package is defined.


;;; file test.lisp
(defpackage "TEST" (:use "CL"))
(in-package "TEST")

(defvar *special-var* nil)
;;; end of file


Best regards,

Marco Gidde
Lars Brinkhoff
2004-06-08 10:57:15 UTC
Permalink
Post by Marco Gidde
when I compile the code snippet below and try to load it into a
fresh environment, emacs-cl complains that the package "TEST" can't
be found.
I couldn't reproduce the error, even with your step-by-step
description. That's strange considering the .elc code which
use INTERN before the package is created. I don't know why
my version of Emacs doesn't throw an error on that. Anyway,
I eliminated the use of load-time-value in the compiler which
was responsible for the early INTERN call. I hope that helps.
--
Lars Brinkhoff, Services for Unix, Linux, GCC, HTTP
Brinkhoff Consulting http://www.brinkhoff.se/
Loading...