GET-MACRO-CHARACTER-READTABLEGET-DISPATCH-MACRO-CHARACTER and to GET-MACRO-CHARACTER must be of type READTABLE, without mention of what happens when NIL is supplied. This may have been simply an oversight, since it makes more sense for it to refer to values from the standard readtable. Both COPY-READTABLE and SET-SYNTAX-FROM-CHAR explicitly say that a NIL in the 'from-readtable' argument refers to the standard readtable. Also, an example in the middle of the page, CLtL p.378, supplies a NIL to GET-MACRO-CHARACTER, and is clearly intending to access the standard readtable values.NIL readtable argument to GET-DISPATCH-MACRO-CHARACTER and to GET-MACRO-CHARACTER mean the same thing it does for COPY-READTABLE, and SET-SYNTAX-FROM-CHAR; namely a reference to the standard readtable. Thus (GET-MACRO-CHARACTER <char> NIL) would be equivalent to (GET-MACRO-CHARACTER <char> (COPY-READTABLE)), but without consing.VAXLISP, and KCL stuck to the more rigid interpretation.COPY-READTABLE) to get at standard readtable semantics.:EDU:Xerox To: common-lisp%sail.stanford:EDU:Xerox
This issue passed at the Jan 89 X3J13 meeting. The only difference between version 2 and 3 was to remove the test case because of problems of "function equivalence":
If "same-function-p" compared functions:
(let ((standard-rt (copy-readtable))
(chars '(#\* #\= #\| #\A #\ #\( #\# #\1)))
;; Test Case 1
(dolist (char chars)
(assert (same-function-p (get-macro-character char nil)
(get-macro-character char standard-rt))
() "Lose on character ~C" char))
;; Test Case 2
(dolist (char chars)
(assert (same-function-p (get-dispatch-macro-character #\# char nil)
(get-dispatch-macro-character #\# char standard-rt))
() "Lose on #\# dispatch character ~C" char))
;; Test Case 3
(assert (same-function-p (get-dispatch-macro-character #\# #\A nil)
(get-dispatch-macro-character #\# #\a nil))
() "Lose on #\# dispatch character ~C" char)
)