changeset 4341:d07ef5ea3b58

(Fdelete_frame): New arg FORCE allows deletion of last non-invisible frame. (Fdelete_frame): Allow deletion if there is some other visible (perhaps iconified) frame. Also allow deleting terminal frame if there are X frames.
author Richard M. Stallman <rms@gnu.org>
date Thu, 29 Jul 1993 06:34:03 +0000
parents 505fb5222dea
children 1088a9aa4fd0
files src/frame.c
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/frame.c	Thu Jul 29 05:37:32 1993 +0000
+++ b/src/frame.c	Thu Jul 29 06:34:03 1993 +0000
@@ -592,12 +592,14 @@
 }
 
 
-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 @@
 
   /* 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-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;
 {