Function: delete-frame

delete-frame is an interactive function defined in frame.c.

Signature

(delete-frame &optional FRAME FORCE)

Documentation

Delete FRAME, eliminating it from use.

FRAME must be a live frame and defaults to the selected one.

When undelete-frame-mode(var)/undelete-frame-mode(fun) is enabled, the 16 most recently deleted frames can be undeleted with undelete-frame, which see.

Do not delete a frame whose minibuffer serves as surrogate minibuffer for another frame. Do not delete a frame if all other frames are invisible unless the second optional argument FORCE is non-nil. Do not delete the initial terminal frame of an Emacs process running as daemon unless FORCE is non-nil.

This function runs delete-frame-functions before actually deleting the frame, unless the frame is a tooltip. The functions are run with one argument, the frame to be deleted.

View in manual

Probably introduced at or before Emacs version 19.29.

Key Bindings

Source Code

// Defined in /usr/src/emacs/src/frame.c
{
  return delete_frame (frame, !NILP (force) ? Qt : Qnil);
}