[slime-devel] Re: problem compiling files defining packages
Lynn Winebarger
owinebar at indiana.edu
Tue Dec 12 23:08:09 UTC 2006
Zach Beane wrote:
> Lynn Winebarger <owinebar at indiana.edu> writes:
>
>> Hi,
>> First, I want to thank the developers for this Lisp IDE. It's
>> very cool. But....
>> I was trying to compile a file with C-c M-k, and the file started out
>>
>> (defpackage "my-package" (:intern <stuff>) (:use "COMMON-LISP"))
>> (in-package "my-package")
>>
>> Now, this is my first attempt at compiling a CL file (under SBCL
>> 0.9.18), with or with a package involved. And it kept spitting out
>> errors for the stuff after these two lines, and I could not for the
>> life of me see why.
>
> What errors do you get? I can't make my system produce an error from
> what you wrote above (but I'm not sure what you used for <stuff>).
Aaargh. Despite several hours of frustration last night and this
morning, it's not producing an error for me, now, either.
I had first tried the compile/load file on the code below (to give some
more context). It must have "infected" the system, though I quit and
restarted Emacs each time to purge the effect of the load. I am using
some of the names from the COMMON-LISP package and it took a few
attempts to understand how to override them (and still be able to use
the standard language elements).
The next changes were to add (:use "common-lisp"), which then
changed to (:use "COMMON-LISP"), and then added the (:intern "READ" ...).
My apologies,
Lynn
(defpackage "my-package")
(in-package "my-package")
;;;; string checker, for catching non-portability early
(defun make-quote-reader (standard-quote-reader)
(lambda (stream char)
(let ((result (funcall standard-quote-reader stream char)))
(unless (every (lambda (x) (typep x 'standard-char)) result)
(warn "Found non-STANDARD-CHAR in ~S" result))
result)))
(compile 'make-quote-reader)
(set-macro-character #\" (make-quote-reader (get-macro-character #\" nil)))
(defun def-name-p (sym)
(let ((name (symbol-name sym)))
(if (string= (subseq (string-upcase name) 0 2) "DEF")
(if (alphanumericp (char name 3))
(intern (subseq name 4))
(intern (subseq name 3)))
nil)))
More information about the slime-devel
mailing list