In Common Lisp, I believe defpackage is to either define or
*redefine* a package. I've found that in abcl if the package is
already defined, defpackage won't redefine it (apparently).
To wit:
CL-USER(2): CL-USER(2): (package-nicknames :utilities)
=> error package not found
CL-USER(3): (make-package :utilities) ;; so make the
package
#<PACKAGE UTILITIES>
CL-USER(4): (package-nicknames :utilities)
NIL ;; has no nicknames
CL-USER(5): (defpackage "UTILITIES"
(:use "COMMON-LISP")
(:nicknames "UTIL")) ;; use defpackage to define a
nickname
#<PACKAGE UTILITIES>
CL-USER(6): (PACKAGE-NICKNAMES :UTILITIES)
NIL ;;but still no nickname
CL-USER(7): (delete-package :utilities) ;; get rid of the
package
T
CL-USER(8): (defpackage "UTILITIES" ;; redefine it
(:use "COMMON-LISP")
(:nicknames "UTIL"))
#<PACKAGE UTILITIES>
CL-USER(9): (package-nicknames :utilities)
("UTIL") ;; and it has nicknames
CL-USER(10):
Is this a bug?
Thanks,
Pete