elisp: Deleting Frames

 
 28.7 Deleting Frames
 ====================
 
 A “live frame” is one that has not been deleted.  When a frame is
 deleted, it is removed from its terminal display, although it may
 continue to exist as a Lisp object until there are no more references to
 it.
 
  -- Command: delete-frame &optional frame force
      This function deletes the frame FRAME.  Unless FRAME is a tooltip,
      it first runs the hook ‘delete-frame-functions’ (each function gets
      one argument, FRAME).  By default, FRAME is the selected frame.
 
      A frame cannot be deleted as long as its minibuffer serves as
      surrogate minibuffer for another frame (SeeMinibuffers and
      Frames).  Normally, you cannot delete a frame if all other frames
      are invisible, but if FORCE is non-‘nil’, then you are allowed to
      do so.
 
  -- Function: frame-live-p frame
      The function ‘frame-live-p’ returns non-‘nil’ if the frame FRAME
      has not been deleted.  The possible non-‘nil’ return values are
      like those of ‘framep’.  SeeFrames.
 
    Some window managers provide a command to delete a window.  These
 work by sending a special message to the program that operates the
 window.  When Emacs gets one of these commands, it generates a
 ‘delete-frame’ event, whose normal definition is a command that calls
 the function ‘delete-frame’.  SeeMisc Events.