kcw@shark.cis.ufl.edu (Ken Whedbee) (01/01/91)
Anybody out there messed around with read-macros in xlisp? If I type this into Common Lisp, I get: > (set-macro-character #\? #'(lambda (stream char) (list '*var* (read stream)))) T > (setq foo '?bar) (*VAR* BAR) But if I try the same thing in xlisp, I get instead: > (setq foo '?bar) *VAR* I've tried this on both the Almy-bugpatched xlisp and a virgin copy of xlisp2.0. For the sake of completeness, I'm using this defn. of SET-MACRO-CHARACTER that comes standard in INIT.LSP. ; (set-macro-character ch fun [ tflag ]) (defun set-macro-character (ch fun &optional tflag) (setf (aref *readtable* (char-int ch)) (cons (if tflag :tmacro :nmacro) fun)) t) My question: Am I doing anything obviously wrong? Is there a trick way to get the same thing in xlisp ? I started to spelunk around in the C source code and evaluating a readmacro takes you thru quite a trail. in xlread.c: readone() --> callmacro --> in xleval.c xlapply() --> evfun() ??? If I want to fix (the Common Lisp compatibility bug ?) can anyone suggest a good starting point in this trail ? Ken kcw@reef.cis.ufl.edu -- Ken Whedbee Internet: kcw@beach.cis.ufl.edu University of Florida UUCP: ..!uflorida!beach.cis.ufl.edu!kcw "C Code. C code run. Run, code, run... PLEASE!!!" -- Barbara Toungue