]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame.
authorRichard M. Stallman <rms@gnu.org>
Thu, 29 Jul 1993 06:34:03 +0000 (06:34 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 29 Jul 1993 06:34:03 +0000 (06:34 +0000)
(Fdelete_frame): Allow deletion if there is some other
visible (perhaps iconified) frame.  Also allow deleting terminal frame
if there are X frames.

src/frame.c

index 4bfa9640bde8834dced711f9930cf1494d6b9312..24d36115b6da7b0a8d54cf43e3cafd3654416d47 100644 (file)
@@ -592,12 +592,14 @@ If MINIFRAME is non-nil and not a window, include all frames.")
 }
 
 \f
-DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 1, "",
+DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 2, "",
   "Delete FRAME, permanently eliminating it from use.\n\
 If omitted, FRAME defaults to the selected frame.\n\
-A frame may not be deleted if its minibuffer is used by other frames.")
-  (frame)
-     Lisp_Object frame;
+A frame may not be deleted if its minibuffer is used by other frames.\n\
+Normally, you may not delete a frame if all other frames are invisible,\n\
+but if the second optional argument FORCE is non-nil, you may do so.")
+  (frame, force)
+     Lisp_Object frame, force;
 {
   struct frame *f;
 
@@ -617,7 +619,7 @@ A frame may not be deleted if its minibuffer is used by other frames.")
 
   /* If all other frames are invisible, refuse to delete.
      (Exception: allow deleting the terminal frame when using X.)  */
-  if (f == selected_frame)
+  if (f == selected_frame && NILP (force))
     {
       Lisp_Object frames;
       int count = 0;
@@ -1372,9 +1374,9 @@ DEFUN ("set-frame-size", Fset_frame_size, Sset_frame_size, 3, 3, 0,
 DEFUN ("set-frame-position", Fset_frame_position, 
        Sset_frame_position, 3, 3, 0,
   "Sets position of FRAME in pixels to XOFFSET by YOFFSET.\n\
-If XOFFSET or YOFFSET are negative, they are interpreted relative to\n\
-the leftmost or bottommost position FRAME could occupy without going\n\
-off the screen.")
+This is actually the position of the upper left corner of the frame.\n\
+Negative values for XOFFSET or YOFFSET are interpreted relative to\n\
+the leftmost or bottommost possible position (that stays within the screen).")
   (frame, xoffset, yoffset)
      Lisp_Object frame, xoffset, yoffset;
 {