All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

confirm-quit Function

Summary

Quits the Lisp session, potentially after user confirmation.

Package

capi

Signature

confirm-quit application-name

Arguments
application-name
A string.
Description

The function confirm-quit calls quit, potentially after confirmation from the user.

The behavior of confirm-quit when called within LispWorks is determined by a LispWorks user preference, which can be set by Tools > Preferences... > Environment > General > Confirm Before Exiting. This preference can also be set programmatically (for example in an application) by set-confirm-quit-flag.

If the value of the flag is :check-editor-files (the default), confirm-quit checks whether there are editor buffers which are associated with files and are modified. If there is at least one such modified buffer, confirm-quit prompts the user to decide between three options:

Save Changes
Saves all modified buffers before quitting.
Discard Changes
Quits without saving.
Cancel
Does not save or quit.

If there are no such modified buffers, confirm-quit simply calls quit.

If the flag is nil then confirm-quit simply calls quit.

If the flag is t then confirm-quit prompts the user. If there are unsaved buffers, the prompt is as described above, otherwise the prompt is a simple yes/no confirmer dialog.

application-name is used in the prompt to identify the application.

Notes

The LispWorks IDE uses confirm-quit.

See also

set-confirm-quit-flag


CAPI User Guide and Reference Manual (Windows version) - 01 Dec 2021 19:33:57