0.9.18.33:
[sbcl.git] / src / code / sharpm.lisp
index 0fa36ce..e720699 100644 (file)
   (let ((entry (assoc label *sharp-equal-alist*)))
     (if entry
         (third entry)
-        (let ((pair (assoc label *sharp-sharp-alist*)))
+        (let (;; Has this label been defined previously? (Don't read
+              ;; ANSI "2.4.8.15 Sharpsign Equal-Sign" and worry that
+              ;; it requires you to implement forward references,
+              ;; because forward references are disallowed in
+              ;; "2.4.8.16 Sharpsign Sharpsign".)
+              (pair (assoc label *sharp-sharp-alist*)))
           (unless pair
-            (%reader-error stream "object is not labelled #~S#" label))
+            (%reader-error stream "reference to undefined label #~D#" label))
           (cdr pair)))))
 \f
 ;;;; conditional compilation: the #+ and #- readmacros
 
 (flet ((guts (stream not-p)
-         (unless (if (handler-case
-                         (let ((*package* *keyword-package*)
-                               (*read-suppress* nil))
-                           (featurep (read stream t nil t)))
-                       (reader-package-error
-                        (condition)
-                        (declare (ignore condition))
-                        nil))
+         (unless (if (let ((*package* *keyword-package*)
+                           (*read-suppress* nil))
+                       (featurep (read stream t nil t)))
                      (not not-p)
                      not-p)
            (let ((*read-suppress* t))