*exit-cleanup-forms*

Variable

Package: system

Forms can be pushed onto this variable to ensure that they are eval'd before 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 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 the 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 documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.