0.8.15.18: Linkage table tweaks & alien bugfix
[sbcl.git] / src / code / backq.lisp
index 32cbdcf..49d1ba8 100644 (file)
                (cons 'backq-list* thing))))
        ((eq flag 'vector)
         (list 'backq-vector thing))
-       (t (cons (cdr
-                 (assoc flag
-                        '((cons . backq-cons)
-                          (list . backq-list)
-                          (append . backq-append)
-                          (nconc . backq-nconc))
-                        :test #'equal))
+       (t (cons (ecase flag
+                  ((list) 'backq-list)
+                  ((append) 'backq-append)
+                  ((nconc) 'backq-nconc))
                 thing))))
 \f
 ;;;; magic BACKQ- versions of builtin functions
   (set-macro-character #\, #'comma-macro))
 #+sb-xc-host (!backq-cold-init)
 
+;;; The pretty-printer needs to know about our special tokens
+(defvar *backq-tokens*
+  '(backq-comma backq-comma-at backq-comma-dot backq-list
+    backq-list* backq-append backq-nconc backq-cons backq-vector))
+
+;;; Since our backquote is installed on the host lisp, and since
+;;; developers make mistakes with backquotes and commas too, let's
+;;; ensure that we can report errors rather than get an undefined
+;;; function condition on %READER-ERROR.
+#+sb-xc-host ; proper definition happens for the target
+(defun %reader-error (stream format-string &rest format-args)
+  (bug "READER-ERROR on stream ~S: ~?" stream format-string format-args))
+
 (/show0 "done with backq.lisp")