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

turning off continuable error messages



   Date: Wed, 16 Feb 94 22:29:58 +0100
   From: haible@ma2s2.mathematik.uni-karlsruhe.de (Bruno Haible)

   Dan Stanger <dxs@evolving.com> says:

   (load "loop.lsp")
   > ** - Continuable Error
   > Redefining the COMMON LISP macro LOOP
   >
   > i would like the lisp system to not query the user but just
   > replace the definition.

   You absolutely want to live dangerous? Then
     (defun sys::exported-lisp-symbol-p (symbol) (declare (ignore symbol)) nil)

   One should be able to handle this using the new condition system (instead
   of modifying an undocumented function). Does someone know how?

SYSTEM::REMOVE-OLD-DEFINITIONS, which is the function that signals the
error, does not use a specific condition type for this error, so you
have to look at the control string.  (It would be nice to have all the
system functions signal typed errors, but that's a tremendous amount
of work.)

(handler-bind
  ((simple-error #'(lambda (c)
	      (when (string-equal (simple-condition-format-control c)
				  "Redefining the COMMON LISP ~A ~S")
		    (continue)))))
  ... Your code here ...)

Unfortunately, this isn't working in my hacked up 1994-01-25 (it
should) for some obscure reason: SIGNAL does not seem to be calling
the handler.  I'll look into it.

--David Gadbois