[armedbear-cvs] r14421 - trunk/abcl/src/org/armedbear/lisp

rschlatte at common-lisp.net rschlatte at common-lisp.net
Tue Mar 5 19:57:44 UTC 2013


Author: rschlatte
Date: Tue Mar  5 11:57:43 2013
New Revision: 14421

Log:
Fix package-local nicknames

- avoid failure when package has no global nicknames

- in defpackage, disallow introducing CL as a nickname, not introducing
  a nickname for CL

Modified:
   trunk/abcl/src/org/armedbear/lisp/Package.java
   trunk/abcl/src/org/armedbear/lisp/defpackage.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/Package.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Package.java	Mon Mar  4 15:05:12 2013	(r14420)
+++ trunk/abcl/src/org/armedbear/lisp/Package.java	Tue Mar  5 11:57:43 2013	(r14421)
@@ -778,7 +778,8 @@
       return error(new LispError("Trying to define a local nickname for "
                                  + name));
     }
-    if (name.equals(this.name) || nicknames.contains(name)) {
+    if (name.equals(this.name)
+        || (nicknames != null && nicknames.contains(name))) {
       return error(new LispError("Trying to override package name or nickname with a local nickname "
                                  + name));
     }

Modified: trunk/abcl/src/org/armedbear/lisp/defpackage.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/defpackage.lisp	Mon Mar  4 15:05:12 2013	(r14420)
+++ trunk/abcl/src/org/armedbear/lisp/defpackage.lisp	Tue Mar  5 11:57:43 2013	(r14421)
@@ -131,7 +131,7 @@
                     nickdecl))
            (let ((nickname (string (first nickdecl)))
                  (package-name (designated-package-name (second nickdecl))))
-             (when (member package-name '("CL" "COMMON-LISP" "KEYWORD")
+             (when (member nickname '("CL" "COMMON-LISP" "KEYWORD")
                            :test #'string-equal)
                (cerror "Continue anyway"
                        (format nil "Trying to define a local nickname for package ~A"




More information about the armedbear-cvs mailing list