diff options
| author | Richard M. Stallman | 1994-03-08 06:18:49 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-03-08 06:18:49 +0000 |
| commit | f7af3f7b44c971f3393f3c28e877f06a03b51b7b (patch) | |
| tree | 9643be301500d7fa074a4df6ea0b2a5c1a1f8771 /src | |
| parent | b7277ac618a78b39ad5b28a20464b3dc64217ad0 (diff) | |
| download | emacs-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.c | 35 |
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; | |||
| 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 (); |
| @@ -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 | |||
| 473 | Lisp_Object | 476 | Lisp_Object |
| 474 | next_frame (frame, minibuf) | 477 | next_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 | |||
| 528 | Lisp_Object | 539 | Lisp_Object |
| 529 | prev_frame (frame, minibuf) | 540 | prev_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\ | |||
| 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 | { |
| @@ -605,7 +623,8 @@ 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 | { |
| @@ -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 | ||