changeset 22188:9fba463768ec

(frame_buffer_predicate): New arg FRAME. (frame_buffer_list, set_frame_buffer_list): Likewise. (make_frame): Pass new arg to Fother_buffer. (make_frame_visible_1): New function. (Fmake_frame_visible): Use that.
author Richard M. Stallman <rms@gnu.org>
date Fri, 22 May 1998 20:04:40 +0000
parents 9509e86a7be5
children 2a61a0a3a9be
files src/frame.c
diffstat 1 files changed, 39 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/frame.c	Fri May 22 20:03:28 1998 +0000
+++ b/src/frame.c	Fri May 22 20:04:40 1998 +0000
@@ -356,7 +356,7 @@
     /* If buf is a 'hidden' buffer (i.e. one whose name starts with
        a space), try to find another one.  */
     if (XSTRING (Fbuffer_name (buf))->data[0] == ' ')
-      buf = Fother_buffer (buf, Qnil);
+      buf = Fother_buffer (buf, Qnil, Qnil);
     Fset_window_buffer (root_window, buf);
 
     f->buffer_list = Fcons (buf, Qnil);
@@ -1424,6 +1424,8 @@
   return Qnil;
 }
 
+static void make_frame_visible_1 P_ ((Lisp_Object));
+
 DEFUN ("make-frame-visible", Fmake_frame_visible, Smake_frame_visible,
        0, 1, "",
   "Make the frame FRAME visible (assuming it is an X-window).\n\
@@ -1445,12 +1447,37 @@
     }
 #endif
 
+  make_frame_visible_1 (XFRAME (frame)->root_window);
+
   /* Make menu bar update for the Buffers and Frams menus.  */
   windows_or_buffers_changed++;
 
   return frame;
 }
 
+/* Update the display_time slot of the buffers shown in WINDOW
+   and all its descendents.  */
+
+static void
+make_frame_visible_1 (window)
+     Lisp_Object window;
+{
+  struct window *w;
+
+  for (;!NILP (window); window = w->next)
+    {
+      w = XWINDOW (window);
+
+      if (!NILP (w->buffer))
+	XBUFFER (w->buffer)->display_time = Fcurrent_time ();
+
+      if (!NILP (w->vchild))
+	make_frame_visible_1 (w->vchild);
+      if (!NILP (w->hchild))
+	make_frame_visible_1 (w->hchild);
+    }
+}
+
 DEFUN ("make-frame-invisible", Fmake_frame_invisible, Smake_frame_invisible,
        0, 2, "",
   "Make the frame FRAME invisible (assuming it is an X-window).\n\
@@ -1696,26 +1723,28 @@
 /* Return the buffer-predicate of the selected frame.  */
 
 Lisp_Object
-frame_buffer_predicate ()
+frame_buffer_predicate (frame)
+     Lisp_Object frame;
 {
-  return selected_frame->buffer_predicate;
+  return XFRAME (frame)->buffer_predicate;
 }
 
 /* Return the buffer-list of the selected frame.  */
 
 Lisp_Object
-frame_buffer_list ()
+frame_buffer_list (frame)
+     Lisp_Object frame;
 {
-  return selected_frame->buffer_list;
+  return XFRAME (frame)->buffer_list;
 }
 
 /* Set the buffer-list of the selected frame.  */
 
 void
-set_frame_buffer_list (list)
-     Lisp_Object list;
+set_frame_buffer_list (frame, list)
+     Lisp_Object frame, list;
 {
-  selected_frame->buffer_list = list;
+  XFRAME (frame)->buffer_list = list;
 }
 
 /* Discard BUFFER from the buffer-list of each frame.  */
@@ -1920,7 +1949,8 @@
 		   : FRAME_MINIBUF_ONLY_P (f) ? Qonly
 		   : FRAME_MINIBUF_WINDOW (f)));
   store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil));
-  store_in_alist (&alist, Qbuffer_list, frame_buffer_list ());
+  store_in_alist (&alist, Qbuffer_list,
+		  frame_buffer_list (Fselected_frame ()));
 
   /* I think this should be done with a hook.  */
 #ifdef HAVE_WINDOW_SYSTEM