(replace (character-macro-table really-to-readtable)
(character-macro-table really-from-readtable))
(setf (dispatch-tables really-to-readtable)
- (mapcar #'(lambda (pair) (cons (car pair)
- (copy-seq (cdr pair))))
+ (mapcar (lambda (pair) (cons (car pair)
+ (copy-seq (cdr pair))))
(dispatch-tables really-from-readtable)))
(setf (readtable-case really-to-readtable)
(readtable-case really-from-readtable))
(return-from make-float (if negative-fraction
(- num)
num))))))
- ;; should never happen:
- (t (error "internal error in floating point reader")))))
+ ;; should never happen
+ (t (bug "bad fallthrough in floating point reader")))))
(defun make-float-aux (number divisor float-format)
(coerce (/ number divisor) float-format))
#!+sb-doc
"Return the macro character function for SUB-CHAR under DISP-CHAR
or NIL if there is no associated function."
- (unless (digit-char-p sub-char)
- (let* ((sub-char (char-upcase sub-char))
- (rt (or rt *standard-readtable*))
- (dpair (find disp-char (dispatch-tables rt)
- :test #'char= :key #'car)))
- (if dpair
- (elt (the simple-vector (cdr dpair))
- (char-code sub-char))
- (error "~S is not a dispatch char." disp-char)))))
+ (let* ((sub-char (char-upcase sub-char))
+ (rt (or rt *standard-readtable*))
+ (dpair (find disp-char (dispatch-tables rt)
+ :test #'char= :key #'car)))
+ (if dpair
+ (let ((dispatch-fun (elt (the simple-vector (cdr dpair))
+ (char-code sub-char))))
+ ;; Digits are also initialized in a dispatch table to
+ ;; #'dispatch-char-error; READ-DISPATCH-CHAR handles them
+ ;; separately. - CSR, 2002-04-12
+ (if (eq dispatch-fun #'dispatch-char-error)
+ nil
+ dispatch-fun))
+ (error "~S is not a dispatch char." disp-char))))
(defun read-dispatch-char (stream char)
;; Read some digits.