From: Christophe R. <cs...@ca...> - 2002-10-28 14:24:16
|
Hi, Attached is a patch to fix our handling of CCASE, ECASE, CTYPECASE and ETYPECASE. Somewhat surprisingly, it's shown up some other issues: firstly, in handling of warnings in CAREFULLY-MACROEXPAND; I hope that this patch doesn't break building under ancient compilers (it certainly doesn't under CMUCL 3.x/CMUCL 18d) but it might be worth checking; secondly, in EVAL-IN-LEXENV: (%eval original-exp lexenv) [ this is after original-exp has been macroexpanded into exp ] is there a reason why we pass the original-exp to %EVAL, rather than EXP? The situation where this displays some strangeness is as follows (at the REPL, with the attached patch): * (ecase 1 (1 nil) (t t)) STYLE-WARNING: Treating bare T in ECASE as introducing a normal-clause, not an otherwise-clause ; in: LAMBDA NIL ; (ECASE 1 (1 NIL) (T T)) ; ; caught STYLE-WARNING: ; (in macroexpansion of (ECASE 1 # ...)) ; (hint: For more precise location, try *BREAK-ON-SIGNALS*.) ; Treating bare T in ECASE as introducing a normal-clause, not an otherwise-clause (note the double style-warning, one from the first macroexpansion, and one as a result of passing the original expression to %EVAL, rather than the macroexpanded expression). Can I just change original-exp to exp, or was there a reason for doing it this way? Cheers, Christophe -- http://www-jcsu.jesus.cam.ac.uk/~csr21/ +44 1223 510 299/+44 7729 383 757 (set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b))) (defvar b "~&Just another Lisp hacker~%") (pprint #36rJesusCollegeCambridge) |