emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105753: * lisp/window.el (window-del


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105753: * lisp/window.el (window-deletable-p): Never delete last frame on a terminal.
Date: Tue, 13 Sep 2011 11:33:16 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105753
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Tue 2011-09-13 11:33:16 -0400
message:
  * lisp/window.el (window-deletable-p): Never delete last frame on a terminal.
  
  * src/frame.c (Fother_visible_frames_p): Function deleted.
modified:
  lisp/ChangeLog
  lisp/window.el
  src/ChangeLog
  src/frame.c
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-09-13 07:22:05 +0000
+++ b/lisp/ChangeLog    2011-09-13 15:33:16 +0000
@@ -1,3 +1,8 @@
+2011-09-13  Chong Yidong  <address@hidden>
+
+       * window.el (window-deletable-p): Never delete the last frame on a
+       given terminal.
+
 2011-09-13  Glenn Morris  <address@hidden>
 
        * help.el (describe-key-briefly): Copy previous standard-output change.

=== modified file 'lisp/window.el'
--- a/lisp/window.el    2011-09-11 20:07:34 +0000
+++ b/lisp/window.el    2011-09-13 15:33:16 +0000
@@ -2312,13 +2312,19 @@
                                 buffer))))))
     (cond
      ((frame-root-window-p window)
-      (when (and (or force dedicated
-                    (and (not prev) (memq window-auto-delete '(t frame))))
-                (other-visible-frames-p frame))
-       ;; We can delete WINDOW's frame if (1) either FORCE is non-nil,
-       ;; WINDOW is dedicated to its buffer, or there are no previous
-       ;; buffers to show and (2) there are other visible frames left.
-       'frame))
+      ;; We can delete the frame if (1) FORCE is non-nil, WINDOW is
+      ;; dedicated to its buffer, or there are no previous buffers to
+      ;; show and (2) there are other visible frames on this terminal.
+      (and (or force dedicated
+              (and (not prev) (memq window-auto-delete '(t frame))))
+          ;; Are there visible frames on the same terminal?
+          (let ((terminal (frame-terminal frame)))
+            (catch 'found
+              (dolist (f (delq frame (frame-list)))
+                (and (eq terminal (frame-terminal f))
+                     (frame-visible-p f)
+                     (throw 'found t)))))
+          'frame))
      ((and (or force dedicated
               (and (not prev) (memq window-auto-delete '(t window))))
           (or ignore-window-parameters

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-09-12 11:51:27 +0000
+++ b/src/ChangeLog     2011-09-13 15:33:16 +0000
@@ -1,3 +1,7 @@
+2011-09-13  Chong Yidong  <address@hidden>
+
+       * frame.c (Fother_visible_frames_p): Function deleted.
+
 2011-09-12  Eli Zaretskii  <address@hidden>
 
        * indent.c (compute_motion): Process display vector front to back

=== modified file 'src/frame.c'
--- a/src/frame.c       2011-09-09 08:32:43 +0000
+++ b/src/frame.c       2011-09-13 15:33:16 +0000
@@ -1155,17 +1155,6 @@
   return 1;
 }
 
-DEFUN ("other-visible-frames-p", Fother_visible_frames_p, 
Sother_visible_frames_p, 0, 1, 0,
-       doc: /* Return t if there are other visible frames beside FRAME.
-FRAME defaults to the selected frame.  */)
-  (Lisp_Object frame)
-{
-  if (NILP (frame))
-    frame = selected_frame;
-  CHECK_LIVE_FRAME (frame);
-  return other_visible_frames (XFRAME (frame)) ? Qt : Qnil;
-}
-
 /* Delete FRAME.  When FORCE equals Qnoelisp, delete FRAME
   unconditionally.  x_connection_closed and delete_terminal use
   this.  Any other value of FORCE implements the semantics
@@ -4475,7 +4464,6 @@
   defsubr (&Sframe_list);
   defsubr (&Snext_frame);
   defsubr (&Sprevious_frame);
-  defsubr (&Sother_visible_frames_p);
   defsubr (&Sdelete_frame);
   defsubr (&Smouse_position);
   defsubr (&Smouse_pixel_position);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]