aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-03-08 06:18:49 +0000
committerRichard M. Stallman1994-03-08 06:18:49 +0000
commitf7af3f7b44c971f3393f3c28e877f06a03b51b7b (patch)
tree9643be301500d7fa074a4df6ea0b2a5c1a1f8771 /src
parentb7277ac618a78b39ad5b28a20464b3dc64217ad0 (diff)
downloademacs-f7af3f7b44c971f3393f3c28e877f06a03b51b7b.tar.gz
emacs-f7af3f7b44c971f3393f3c28e877f06a03b51b7b.zip
(next_frame, prev_frame): If MINIBUF is `visible',
consider only visible frames. (Fnext_frame, Fprevious_frame): Doc fix. (syms_of_frame): Staticpro Qvisible.
Diffstat (limited to 'src')
-rw-r--r--src/frame.c35
1 files changed, 28 insertions, 7 deletions
diff --git a/src/frame.c b/src/frame.c
index f90d5384b0e..5c6bffd05a9 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -85,6 +85,7 @@ Lisp_Object Qunsplittable;
85Lisp_Object Qmenu_bar_lines; 85Lisp_Object Qmenu_bar_lines;
86Lisp_Object Qwidth; 86Lisp_Object Qwidth;
87Lisp_Object Qx; 87Lisp_Object Qx;
88Lisp_Object Qvisible;
88 89
89extern Lisp_Object Vminibuffer_list; 90extern Lisp_Object Vminibuffer_list;
90extern Lisp_Object get_minibuffer (); 91extern Lisp_Object get_minibuffer ();
@@ -469,7 +470,9 @@ DEFUN ("frame-list", Fframe_list, Sframe_list,
469 If MINIBUF is nil, exclude minibuffer-only frames. 470 If MINIBUF is nil, exclude minibuffer-only frames.
470 If MINIBUF is a window, include only frames using that window for 471 If MINIBUF is a window, include only frames using that window for
471 their minibuffer. 472 their minibuffer.
472 If MINIBUF is non-nil, and not a window, include all frames. */ 473 If MINIBUF is `visible', include all visible frames.
474 Otherwise, include all frames. */
475
473Lisp_Object 476Lisp_Object
474next_frame (frame, minibuf) 477next_frame (frame, minibuf)
475 Lisp_Object frame; 478 Lisp_Object frame;
@@ -506,7 +509,13 @@ next_frame (frame, minibuf)
506 if (! FRAME_MINIBUF_ONLY_P (XFRAME (f))) 509 if (! FRAME_MINIBUF_ONLY_P (XFRAME (f)))
507 return f; 510 return f;
508 } 511 }
509 else if (XTYPE (minibuf) == Lisp_Window) 512 else if (EQ (minibuf, Qvisible))
513 {
514 FRAME_SAMPLE_VISIBILITY (XFRAME (f));
515 if (FRAME_VISIBLE_P (XFRAME (f)))
516 return f;
517 }
518 else if (WINDOWP (minibuf))
510 { 519 {
511 if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf)) 520 if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf))
512 return f; 521 return f;
@@ -524,7 +533,9 @@ next_frame (frame, minibuf)
524 If MINIBUF is nil, exclude minibuffer-only frames. 533 If MINIBUF is nil, exclude minibuffer-only frames.
525 If MINIBUF is a window, include only frames using that window for 534 If MINIBUF is a window, include only frames using that window for
526 their minibuffer. 535 their minibuffer.
527 If MINIBUF is non-nil and not a window, include all frames. */ 536 If MINIBUF is `visible', include all visible frames.
537 Otherwise, include all frames. */
538
528Lisp_Object 539Lisp_Object
529prev_frame (frame, minibuf) 540prev_frame (frame, minibuf)
530 Lisp_Object frame; 541 Lisp_Object frame;
@@ -560,6 +571,12 @@ prev_frame (frame, minibuf)
560 if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf)) 571 if (EQ (FRAME_MINIBUF_WINDOW (XFRAME (f)), minibuf))
561 prev = f; 572 prev = f;
562 } 573 }
574 else if (EQ (minibuf, Qvisible))
575 {
576 FRAME_SAMPLE_VISIBILITY (XFRAME (f));
577 if (FRAME_VISIBLE_P (XFRAME (f)))
578 prev = f;
579 }
563 else 580 else
564 prev = f; 581 prev = f;
565 } 582 }
@@ -584,7 +601,8 @@ If omitted, FRAME defaults to the selected frame.\n\
584If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\ 601If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\
585If MINIFRAME is a window, include only frames using that window for their\n\ 602If MINIFRAME is a window, include only frames using that window for their\n\
586minibuffer.\n\ 603minibuffer.\n\
587If MINIFRAME is non-nil and not a window, include all frames.") 604If MINIFRAME is `visible', include all visible frames.\n\
605Otherwise, include all frames.")
588 (frame, miniframe) 606 (frame, miniframe)
589 Lisp_Object frame, miniframe; 607 Lisp_Object frame, miniframe;
590{ 608{
@@ -605,7 +623,8 @@ If omitted, FRAME defaults to the selected frame.\n\
605If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\ 623If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\
606If MINIFRAME is a window, include only frames using that window for their\n\ 624If MINIFRAME is a window, include only frames using that window for their\n\
607minibuffer.\n\ 625minibuffer.\n\
608If MINIFRAME is non-nil and not a window, include all frames.") 626If MINIFRAME is `visible', include all visible frames.\n\
627Otherwise, include all frames.")
609 (frame, miniframe) 628 (frame, miniframe)
610 Lisp_Object frame, miniframe; 629 Lisp_Object frame, miniframe;
611{ 630{
@@ -1505,12 +1524,14 @@ syms_of_frame ()
1505 staticpro (&Qonly); 1524 staticpro (&Qonly);
1506 Qunsplittable = intern ("unsplittable"); 1525 Qunsplittable = intern ("unsplittable");
1507 staticpro (&Qunsplittable); 1526 staticpro (&Qunsplittable);
1527 Qmenu_bar_lines = intern ("menu-bar-lines");
1528 staticpro (&Qmenu_bar_lines);
1508 Qwidth = intern ("width"); 1529 Qwidth = intern ("width");
1509 staticpro (&Qwidth); 1530 staticpro (&Qwidth);
1510 Qx = intern ("x"); 1531 Qx = intern ("x");
1511 staticpro (&Qx); 1532 staticpro (&Qx);
1512 Qmenu_bar_lines = intern ("menu-bar-lines"); 1533 Qvisible = intern ("visible");
1513 staticpro (&Qmenu_bar_lines); 1534 staticpro (&Qvisible);
1514 1535
1515 staticpro (&Vframe_list); 1536 staticpro (&Vframe_list);
1516 1537