From: Daniel Mahler

Subject: conditions and restarts

Date: 1996-10-9 1:00

According to my reading of cltl2,
the following code should print (and return) "HI THERE"

(defun handle ()
  (handler-case (raise)
    (error (c)
	   (invoke-restart 'hi))))

(defun raise ()
  (restart-case (error "raise")
     (hi () (princ "HI THERE"))))

(handle)

However Allegro CL (both 4.2 & 4.3) gives

Error: restart HI is not active.
  [condition type: CONTROL-ERROR]

Is there a problem with Allegro or with my understanding?

Also cltl2, p873, states
"The handler is executed in the dynamic context of the signaler ..."
I find this a little ambiguous.
In

(defvar *xx* 'global)

(defun a ()
  (handler-case (b)
		(condition (c) (print *xx*))))

(defun b ()
  (let ((*xx* 'local))
    (error "b")))

(a)

Is the signaller the call to B or the call to ERROR?
I would have thought the signaller was the actual call to ERROR,
but that would mean that LOCAL should be printed;
Allegro prints GLOBAL.

thanks
Daniel