aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-07-29 06:34:03 +0000
committerRichard M. Stallman1993-07-29 06:34:03 +0000
commit60bf8ee42668aa18974c23a6c625a1dfdb77a35c (patch)
tree5dc9829dd0abed7844a1a90f03976a6bdbded26c
parent15a36ac5acf7800ea3e65ccaf2e2decae999b3d1 (diff)
downloademacs-60bf8ee42668aa18974c23a6c625a1dfdb77a35c.tar.gz
emacs-60bf8ee42668aa18974c23a6c625a1dfdb77a35c.zip
(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.
-rw-r--r--src/frame.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/frame.c b/src/frame.c
index 4bfa9640bde..24d36115b6d 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -592,12 +592,14 @@ If MINIFRAME is non-nil and not a window, include all frames.")
592} 592}
593 593
594 594
595DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 1, "", 595DEFUN ("delete-frame", Fdelete_frame, Sdelete_frame, 0, 2, "",
596 "Delete FRAME, permanently eliminating it from use.\n\ 596 "Delete FRAME, permanently eliminating it from use.\n\
597If omitted, FRAME defaults to the selected frame.\n\ 597If omitted, FRAME defaults to the selected frame.\n\
598A frame may not be deleted if its minibuffer is used by other frames.") 598A frame may not be deleted if its minibuffer is used by other frames.\n\
599 (frame) 599Normally, you may not delete a frame if all other frames are invisible,\n\
600 Lisp_Object frame; 600but if the second optional argument FORCE is non-nil, you may do so.")
601 (frame, force)
602 Lisp_Object frame, force;
601{ 603{
602 struct frame *f; 604 struct frame *f;
603 605
@@ -617,7 +619,7 @@ A frame may not be deleted if its minibuffer is used by other frames.")
617 619
618 /* If all other frames are invisible, refuse to delete. 620 /* If all other frames are invisible, refuse to delete.
619 (Exception: allow deleting the terminal frame when using X.) */ 621 (Exception: allow deleting the terminal frame when using X.) */
620 if (f == selected_frame) 622 if (f == selected_frame && NILP (force))
621 { 623 {
622 Lisp_Object frames; 624 Lisp_Object frames;
623 int count = 0; 625 int count = 0;
@@ -1372,9 +1374,9 @@ DEFUN ("set-frame-size", Fset_frame_size, Sset_frame_size, 3, 3, 0,
1372DEFUN ("set-frame-position", Fset_frame_position, 1374DEFUN ("set-frame-position", Fset_frame_position,
1373 Sset_frame_position, 3, 3, 0, 1375 Sset_frame_position, 3, 3, 0,
1374 "Sets position of FRAME in pixels to XOFFSET by YOFFSET.\n\ 1376 "Sets position of FRAME in pixels to XOFFSET by YOFFSET.\n\
1375If XOFFSET or YOFFSET are negative, they are interpreted relative to\n\ 1377This is actually the position of the upper left corner of the frame.\n\
1376the leftmost or bottommost position FRAME could occupy without going\n\ 1378Negative values for XOFFSET or YOFFSET are interpreted relative to\n\
1377off the screen.") 1379the leftmost or bottommost possible position (that stays within the screen).")
1378 (frame, xoffset, yoffset) 1380 (frame, xoffset, yoffset)
1379 Lisp_Object frame, xoffset, yoffset; 1381 Lisp_Object frame, xoffset, yoffset;
1380{ 1382{