aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-12-21 22:26:02 +0000
committerRichard M. Stallman1994-12-21 22:26:02 +0000
commit329ca57419d446fed5d2f6b327cecf2777bca1b2 (patch)
treeb79d8a58f46dce966cd35b4e7f1d18cda4993814
parentd17f2a43fa2f1d7c40d8df980575a07c64083dd0 (diff)
downloademacs-329ca57419d446fed5d2f6b327cecf2777bca1b2.tar.gz
emacs-329ca57419d446fed5d2f6b327cecf2777bca1b2.zip
(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.
-rw-r--r--src/frame.c27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/frame.c b/src/frame.c
index 39e9a92bcdc..7ad3c1fbe44 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -89,6 +89,7 @@ Lisp_Object Qmenu_bar_lines;
89Lisp_Object Qwidth; 89Lisp_Object Qwidth;
90Lisp_Object Qx; 90Lisp_Object Qx;
91Lisp_Object Qvisible; 91Lisp_Object Qvisible;
92Lisp_Object Qbuffer_predicate;
92 93
93extern Lisp_Object Vminibuffer_list; 94extern Lisp_Object Vminibuffer_list;
94extern Lisp_Object get_minibuffer (); 95extern Lisp_Object get_minibuffer ();
@@ -177,6 +178,7 @@ make_frame (mini_p)
177 f->menu_bar_items = Qnil; 178 f->menu_bar_items = Qnil;
178 f->menu_bar_vector = Qnil; 179 f->menu_bar_vector = Qnil;
179 f->menu_bar_items_used = 0; 180 f->menu_bar_items_used = 0;
181 f->buffer_predicate = Qnil;
180 182
181 root_window = make_window (); 183 root_window = make_window ();
182 if (mini_p) 184 if (mini_p)
@@ -1342,6 +1344,8 @@ See `redirect-frame-focus'.")
1342 1344
1343 1345
1344 1346
1347/* Return the value of frame parameter PROP in frame FRAME. */
1348
1345Lisp_Object 1349Lisp_Object
1346get_frame_param (frame, prop) 1350get_frame_param (frame, prop)
1347 register struct frame *frame; 1351 register struct frame *frame;
@@ -1355,6 +1359,17 @@ get_frame_param (frame, prop)
1355 return Fcdr (tem); 1359 return Fcdr (tem);
1356} 1360}
1357 1361
1362/* Return the buffer-predicate of the selected frame. */
1363
1364Lisp_Object
1365frame_buffer_predicate ()
1366{
1367 return selected_frame->buffer_predicate;
1368}
1369
1370/* Modify the alist in *ALISTPTR to associate PROP with VAL.
1371 If the alist already has an element for PROP, we change it. */
1372
1358void 1373void
1359store_in_alist (alistptr, prop, val) 1374store_in_alist (alistptr, prop, val)
1360 Lisp_Object *alistptr, val; 1375 Lisp_Object *alistptr, val;
@@ -1382,6 +1397,9 @@ store_frame_param (f, prop, val)
1382 else 1397 else
1383 Fsetcdr (tem, val); 1398 Fsetcdr (tem, val);
1384 1399
1400 if (EQ (prop, Qbuffer_predicate))
1401 f->buffer_predicate = val;
1402
1385 if (EQ (prop, Qminibuffer) && WINDOWP (val)) 1403 if (EQ (prop, Qminibuffer) && WINDOWP (val))
1386 { 1404 {
1387 if (! MINI_WINDOW_P (XWINDOW (val))) 1405 if (! MINI_WINDOW_P (XWINDOW (val)))
@@ -1466,19 +1484,16 @@ The meaningful PARMs depend on the kind of frame; undefined PARMs are ignored.")
1466 /* I think this should be done with a hook. */ 1484 /* I think this should be done with a hook. */
1467#ifdef HAVE_X_WINDOWS 1485#ifdef HAVE_X_WINDOWS
1468 if (FRAME_X_P (f)) 1486 if (FRAME_X_P (f))
1469#if 1
1470 x_set_frame_parameters (f, alist); 1487 x_set_frame_parameters (f, alist);
1471#else 1488 else
1489#endif
1472 for (tail = alist; !EQ (tail, Qnil); tail = Fcdr (tail)) 1490 for (tail = alist; !EQ (tail, Qnil); tail = Fcdr (tail))
1473 { 1491 {
1474 elt = Fcar (tail); 1492 elt = Fcar (tail);
1475 prop = Fcar (elt); 1493 prop = Fcar (elt);
1476 val = Fcdr (elt); 1494 val = Fcdr (elt);
1477 x_set_frame_param (f, prop, val, get_frame_param (f, prop));
1478 store_frame_param (f, prop, val); 1495 store_frame_param (f, prop, val);
1479 } 1496 }
1480#endif
1481#endif
1482 1497
1483 return Qnil; 1498 return Qnil;
1484} 1499}
@@ -1754,6 +1769,8 @@ syms_of_frame ()
1754 staticpro (&Qx); 1769 staticpro (&Qx);
1755 Qvisible = intern ("visible"); 1770 Qvisible = intern ("visible");
1756 staticpro (&Qvisible); 1771 staticpro (&Qvisible);
1772 Qbuffer_predicate = intern ("buffer-predicate");
1773 staticpro (&Qbuffer_predicate);
1757 1774
1758 staticpro (&Vframe_list); 1775 staticpro (&Vframe_list);
1759 1776