[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

get-macro-character bug




get-macro-character character doesn't let you change #\\ to a
character macro.  this is because it doesn't look in the right
character attribute table for the attributes.

the old version in code/reader.lisp is:

(defun get-macro-character (char &optional rt)
  "Returns the function associated with the specified char which is a macro
  character.  The optional readtable argument defaults to the current
  readtable."
  (let ((rt (or rt *readtable*)))
    ;; Check macro syntax, return associated function if it's there.
    ;; Returns a value for all constituents.
    (cond ((constituentp char)
	   (values (get-cmt-entry char rt) t))
	  ((terminating-macrop char)
	   (values (get-cmt-entry char rt) nil))
	  (t nil))))


this should read:

(defun get-macro-character (char &optional (rt *readtable*))
  "Returns the function associated with the specified char which is a macro
  character.  The optional readtable argument defaults to the current
  readtable."
  ;; Check macro syntax, return associated function if it's there.
  ;; Returns a value for all constituents.
  (cond ((constituentp char rt)
	 (values (get-cmt-entry char rt) t))
	((terminating-macrop char rt)
	 (values (get-cmt-entry char rt) nil))
	(t nil)))