*exit-cleanup-forms*

$Revision: 5.0.2.2 $

Variable

Package: SYSTEM

Forms can be pushed onto this variable to ensure that they are eval'd before excl:exit actually exits the lisp. During the processing time this variable is set to nil, so that if any of the forms cause an error the exit operation can finish anyway. The usual way to exit Lisp is to call excl:exit although there are many actions which cause that function to be called (e.g. calling the top-level comand :exit or, on Windows, clicking on the Console or Project Window close buttons.) In the example, we show what a list of forms might look like and have one of the forms cause a break (aborting the exit). Note that the value of the variable is nil after teh failed exit.

USER(38): sys:*exit-cleanup-forms*
NIL
USER(39): (setq sys:*exit-cleanup-forms* (list '(format t "Exiting!!!~%")
                    '(break)))
((FORMAT T "Exiting!!!~%") (BREAK))
USER(40): :exit
Exiting!!!
Break: call to the `break' function.

Restart actions (select using :continue):
0: return from break.
1: Really exit (:no-unwind t)
[1c] USER(41): :res
USER(42): sys:*exit-cleanup-forms*
NIL
USER(43):

The general documentation description is in introduction.htm. The index is in index.htm.

Copyright (C) 1998-1999, Franz Inc., Berkeley, CA. All Rights Reserved.