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

Re: Hiding Warnings: probs w/prev code



In article <39743@mimsy.umd.edu> spector@mimsy.umd.edu (Lee Spector) writes:
>(defmacro without-compiler-warnings (&body body)
>    `(handler-bind ((compiler-warning
>                     #'(lambda (condition)
>                         (muffle-warning condition))))
>       ,@body))
>
>? (without-warnings (defun shoe () (horn)))
>;Compiler warnings :
>;   Undefined function HORN, in SHOE inside an anonymous lambda form.
>SHOE

The compiler warning type is ccl::compiler-warning, but,
if you try the following, it seems there is no hope:
? (defvar *co*)
*co*
? (handler-bind ((condition #'(lambda (co) (setf *co* co))))
    (defun shoe () (horn)))
;Compiler warnings :
;   Undefined function HORN, in SHOE inside an anonymous lambda form.
SHOE
? *co*
> Error: Unbound variable: *co*

What else ?						[jack]