changeset 10207:e6618f52efe9

(Fmodify_frame_parameters): For non-X frames, call store_frame_param for each parameter set. (store_frame_param): Handle buffer_predicate field. (frame_buffer_predicate): New function. (Qbuffer_predicate): New variable. (syms_of_frame): Set it up.
author Richard M. Stallman <rms@gnu.org>
date Wed, 21 Dec 1994 22:26:02 +0000
parents c017d1157655
children 9e8f603bcff4
files src/frame.c
diffstat 1 files changed, 22 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/frame.c	Wed Dec 21 22:23:49 1994 +0000
+++ b/src/frame.c	Wed Dec 21 22:26:02 1994 +0000
@@ -89,6 +89,7 @@
 Lisp_Object Qwidth;
 Lisp_Object Qx;
 Lisp_Object Qvisible;
+Lisp_Object Qbuffer_predicate;
 
 extern Lisp_Object Vminibuffer_list;
 extern Lisp_Object get_minibuffer ();
@@ -177,6 +178,7 @@
   f->menu_bar_items = Qnil;
   f->menu_bar_vector = Qnil;
   f->menu_bar_items_used = 0;
+  f->buffer_predicate = Qnil;
 
   root_window = make_window ();
   if (mini_p)
@@ -1342,6 +1344,8 @@
 
 
 
+/* Return the value of frame parameter PROP in frame FRAME.  */
+
 Lisp_Object
 get_frame_param (frame, prop)
      register struct frame *frame;
@@ -1355,6 +1359,17 @@
   return Fcdr (tem);
 }
 
+/* Return the buffer-predicate of the selected frame.  */
+
+Lisp_Object
+frame_buffer_predicate ()
+{
+  return selected_frame->buffer_predicate;
+}
+
+/* Modify the alist in *ALISTPTR to associate PROP with VAL.
+   If the alist already has an element for PROP, we change it.  */
+
 void
 store_in_alist (alistptr, prop, val)
      Lisp_Object *alistptr, val;
@@ -1382,6 +1397,9 @@
   else
     Fsetcdr (tem, val);
 
+  if (EQ (prop, Qbuffer_predicate))
+    f->buffer_predicate = val;
+
   if (EQ (prop, Qminibuffer) && WINDOWP (val))
     {
       if (! MINI_WINDOW_P (XWINDOW (val)))
@@ -1466,19 +1484,16 @@
   /* I think this should be done with a hook.  */
 #ifdef HAVE_X_WINDOWS
   if (FRAME_X_P (f))
-#if 1
     x_set_frame_parameters (f, alist);
-#else
+  else
+#endif
     for (tail = alist; !EQ (tail, Qnil); tail = Fcdr (tail))
       {
 	elt = Fcar (tail);
 	prop = Fcar (elt);
 	val = Fcdr (elt);
-	x_set_frame_param (f, prop, val, get_frame_param (f, prop));
 	store_frame_param (f, prop, val);
       }
-#endif
-#endif
 
   return Qnil;
 }
@@ -1754,6 +1769,8 @@
   staticpro (&Qx);
   Qvisible = intern ("visible");
   staticpro (&Qvisible);
+  Qbuffer_predicate = intern ("buffer-predicate");
+  staticpro (&Qbuffer_predicate);
 
   staticpro (&Vframe_list);