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

Re: special variables



It seems that when you warm boot, the stack is not unwound properly.
If you warm boot while some special variables are bound, they retain
their values in the local envionrment at the time of the boot rather
than get set back to their global values, as with MacLisp's control-G.
Try:

(DECLARE (SPECIAL SPECIAL))

(SETQ SPECIAL 'GLOBAL-VALUE)

(DEFUN WARM-BOOT-LOSS ()
       (LET ((SPECIAL 'LOCAL-VALUE))
	    ;; Bind the special variable to a local value.
	    ;; Infinite loop requires warm booting out.
	    (DO () (NIL))))

(WARM-BOOT-LOSS)

Then try to warm boot and look at the value of SPECIAL.
It will have its LOCAL-VALUE, not its GLOBAL-VALUE.
This is quite a screw in debugging, since you can never tell what
global variables got accidentally clobbered.