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

exporting symbols and printnames: keywords in export lists



[Hi! This is Joerg working on Wolfgang's machine]

>CMU Common Lisp 16b, running on manzell
>Hemlock 3.5 (16b), Python 1.0(16b), target SPARCstation/Sun 4
>Send bug reports and questions to cmucl-bugs@cs.cmu.edu.
So shall I do.

Consider the following example:

	  (defpackage "TEST1"
	    (:use "COMMON-LISP")
	    (:export :test1f)
	  )
	  
	 (in-package "TEST1")
	 
	 (defun test1f (n) (* 2 n))
	 
	 (in-package "TEST2")
	 
	 (use-package "TEST1")

Now for the tests:
	 (describe 'test1::test1f)
is ok.
	 (describe 'test1:test1f)
produces an error:

>Reader error at 11584 on #<Synonym Stream to *TERMINAL-IO*>:
>The symbol "TEST1F" is not external in the TEST1 package.

It appears that CMUlisp doesn't accept symbols from the keyword
package in the export list of defpackage. However, CLtL II, page 270,
states about defpackage that:

	"In every case, any option argument called package-name or
symbol-name may be a string or a symbol; if it is a symbol, only its
print-name matters, and not what package, if any, the symbol happens
to be in."

The export option is specified as (:export {symbol-name}*).

Therefore the above example with (:export :test1f) and (describe
'test1f) should work, considering that the print name of :test1f is
"TEST1F".

	Joerg & Wolfgang