All Manuals > LispWorks User Guide and Reference Manual > 40 The LISPWORKS Package

NextPrevUpTopContentsIndex

quit

Function
Summary

Quits LispWorks.

Package

lispworks

Signature

quit &key status confirm ignore-errors-p return

Arguments

status

An integer.

confirm

A generalized boolean.

ignore-errors-p

A generalized boolean.

return

A generalized boolean.

Values

quit does not return, or returns t.

Description

The function quit exits LispWorks unless the user cancels the operation.

There are two stages which may allow the user the chance to cancel.

  1. First the action items of the action list "Confirm when quitting image" are run. If any action item returns nil, then LispWorks does not exit.
  2. Otherwise, if confirm is true (the default value is nil) then a question like
    "Do you really want to exit LispWorks?"
    is presented to the user. If the answer No is supplied, then LispWorks does not exit. Otherwise, the action items of the action list "When quitting image" are run, and then LispWorks exits, and the value status is returned to the Operating System as the exit value of the LispWorks process. The default value of status is 0.

If ignore-errors-p is true, then any error signaled during the running of the action list items or the confirm prompt is ignored and quit proceeds to exit the image. If ignore-errors-p is nil and an error is signaled during the running of the action list items, then a restart is available allowing the user to choose to continue to exit the image. The default values of ignore-errors-p is nil.

If return is true and LispWorks is going to exit, then quit returns t. This can be used if you want some other Lisp process to kill the current one later, rather than it self-destructing immediately. This can be useful to allow more precise control over process termination. If return is nil then quit does not return. The default value of return is nil.

Notes

On Cocoa, when you define your own application menu (by passing :application-menu when making the application interface), the Quit menu item needs to call capi:destroy on the application interface, rather than quit. See capi:cocoa-default-application-interface in the CAPI User Guide and Reference Manual for more information.

See also

save-image


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex