Mercurial > emacs
comparison src/frame.c @ 6246:128dc040e121
(next_frame, prev_frame): If MINIBUF is `visible',
consider only visible frames.
(Fnext_frame, Fprevious_frame): Doc fix.
(syms_of_frame): Staticpro Qvisible.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 08 Mar 1994 06:18:49 +0000 |
parents | 9422e430f067 |
children | 24d32fc223d2 |
comparison
equal
deleted
inserted
replaced
6245:c05d1d7bc400 | 6246:128dc040e121 |
---|---|
83 Lisp_Object Qonly; | 83 Lisp_Object Qonly; |
84 Lisp_Object Qunsplittable; | 84 Lisp_Object Qunsplittable; |
85 Lisp_Object Qmenu_bar_lines; | 85 Lisp_Object Qmenu_bar_lines; |
86 Lisp_Object Qwidth; | 86 Lisp_Object Qwidth; |
87 Lisp_Object Qx; | 87 Lisp_Object Qx; |
88 Lisp_Object Qvisible; | |
88 | 89 |
89 extern Lisp_Object Vminibuffer_list; | 90 extern Lisp_Object Vminibuffer_list; |
90 extern Lisp_Object get_minibuffer (); | 91 extern Lisp_Object get_minibuffer (); |
91 extern Lisp_Object Fhandle_switch_frame (); | 92 extern Lisp_Object Fhandle_switch_frame (); |
92 extern Lisp_Object Fredirect_frame_focus (); | 93 extern Lisp_Object Fredirect_frame_focus (); |
467 | 468 |
468 /* Return the next frame in the frame list after FRAME. | 469 /* Return the next frame in the frame list after FRAME. |
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 | |
473 Lisp_Object | 476 Lisp_Object |
474 next_frame (frame, minibuf) | 477 next_frame (frame, minibuf) |
475 Lisp_Object frame; | 478 Lisp_Object frame; |
476 Lisp_Object minibuf; | 479 Lisp_Object minibuf; |
477 { | 480 { |
504 if (NILP (minibuf)) | 507 if (NILP (minibuf)) |
505 { | 508 { |
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; |
513 } | 522 } |
514 else | 523 else |
522 | 531 |
523 /* Return the previous frame in the frame list before FRAME. | 532 /* Return the previous frame in the frame list before FRAME. |
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 | |
528 Lisp_Object | 539 Lisp_Object |
529 prev_frame (frame, minibuf) | 540 prev_frame (frame, minibuf) |
530 Lisp_Object frame; | 541 Lisp_Object frame; |
531 Lisp_Object minibuf; | 542 Lisp_Object minibuf; |
532 { | 543 { |
558 else if (XTYPE (minibuf) == Lisp_Window) | 569 else if (XTYPE (minibuf) == Lisp_Window) |
559 { | 570 { |
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 } |
566 | 583 |
567 /* We've scanned the entire list. */ | 584 /* We've scanned the entire list. */ |
582 By default, skip minibuffer-only frames.\n\ | 599 By default, skip minibuffer-only frames.\n\ |
583 If omitted, FRAME defaults to the selected frame.\n\ | 600 If omitted, FRAME defaults to the selected frame.\n\ |
584 If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\ | 601 If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\ |
585 If MINIFRAME is a window, include only frames using that window for their\n\ | 602 If MINIFRAME is a window, include only frames using that window for their\n\ |
586 minibuffer.\n\ | 603 minibuffer.\n\ |
587 If MINIFRAME is non-nil and not a window, include all frames.") | 604 If MINIFRAME is `visible', include all visible frames.\n\ |
605 Otherwise, include all frames.") | |
588 (frame, miniframe) | 606 (frame, miniframe) |
589 Lisp_Object frame, miniframe; | 607 Lisp_Object frame, miniframe; |
590 { | 608 { |
591 Lisp_Object tail; | 609 Lisp_Object tail; |
592 | 610 |
603 By default, skip minibuffer-only frames.\n\ | 621 By default, skip minibuffer-only frames.\n\ |
604 If omitted, FRAME defaults to the selected frame.\n\ | 622 If omitted, FRAME defaults to the selected frame.\n\ |
605 If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\ | 623 If optional argument MINIFRAME is nil, exclude minibuffer-only frames.\n\ |
606 If MINIFRAME is a window, include only frames using that window for their\n\ | 624 If MINIFRAME is a window, include only frames using that window for their\n\ |
607 minibuffer.\n\ | 625 minibuffer.\n\ |
608 If MINIFRAME is non-nil and not a window, include all frames.") | 626 If MINIFRAME is `visible', include all visible frames.\n\ |
627 Otherwise, include all frames.") | |
609 (frame, miniframe) | 628 (frame, miniframe) |
610 Lisp_Object frame, miniframe; | 629 Lisp_Object frame, miniframe; |
611 { | 630 { |
612 Lisp_Object tail; | 631 Lisp_Object tail; |
613 | 632 |
1503 staticpro (&Qname); | 1522 staticpro (&Qname); |
1504 Qonly = intern ("only"); | 1523 Qonly = intern ("only"); |
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 |
1517 DEFVAR_LISP ("terminal-frame", &Vterminal_frame, | 1538 DEFVAR_LISP ("terminal-frame", &Vterminal_frame, |
1518 "The initial frame-object, which represents Emacs's stdout."); | 1539 "The initial frame-object, which represents Emacs's stdout."); |