Subject: Re: turning off continuable error messages

From: haible (Bruno Haible)
Date: Wed, 16 Feb 94 22:28:09 +0100

Dan Stanger <[email-masked]> 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?

                    Bruno Haible
                    [email-masked]

---

From: [email-masked] (David Gadbois)
Date: Wed, 16 Feb 94 16:38:08 -0600

Date: Wed, 16 Feb 94 22:29:58 +0100
   From: [email-masked] (Bruno Haible)

   (load "loop.lsp")
   > i would like the lisp system to not query the user but just
   > replace the definition.

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