X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Freader.lisp;h=56b8ac1a45c09878eba3819d7e931514bfd0e3f6;hb=f71445c16693bf12ac835a46763e1dfb25a6db0a;hp=4fd79a79197a187091c5d6204e3404fc95ae6a75;hpb=564b828342b894e8d65d15c676a402a8bbc08334;p=sbcl.git diff --git a/src/code/reader.lisp b/src/code/reader.lisp index 4fd79a7..56b8ac1 100644 --- a/src/code/reader.lisp +++ b/src/code/reader.lisp @@ -250,17 +250,19 @@ standard Lisp readtable when NIL." :test #'char= :key #'car))) (set-cat-entry to-char att to-readtable) (set-cmt-entry to-char mac to-readtable) - (when from-dpair - (cond - (to-dpair - (let ((table (cdr to-dpair))) - (clrhash table) - (shallow-replace/eql-hash-table table (cdr from-dpair)))) - (t - (let ((pair (cons to-char (make-hash-table)))) - (shallow-replace/eql-hash-table (cdr pair) (cdr from-dpair)) + (cond ((and (not from-dpair) (not to-dpair))) + ((and (not from-dpair) to-dpair) (setf (dispatch-tables to-readtable) - (push pair (dispatch-tables to-readtable))))))))) + (remove to-dpair (dispatch-tables to-readtable)))) + (to-dpair + (let ((table (cdr to-dpair))) + (clrhash table) + (shallow-replace/eql-hash-table table (cdr from-dpair)))) + (t + (let ((pair (cons to-char (make-hash-table)))) + (shallow-replace/eql-hash-table (cdr pair) (cdr from-dpair)) + (setf (dispatch-tables to-readtable) + (push pair (dispatch-tables to-readtable)))))))) t) (defun set-macro-character (char function &optional