diff options
| author | Richard M. Stallman | 1998-05-22 20:04:40 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-05-22 20:04:40 +0000 |
| commit | 98ce16221ecdc66fe440a0ccc61d05fab1c71748 (patch) | |
| tree | 343ebba4b1d8c88ab96d5942430f37fec0440c29 /src | |
| parent | b7354ddfcdd51e4af946e2baad2695999beaff17 (diff) | |
| download | emacs-98ce16221ecdc66fe440a0ccc61d05fab1c71748.tar.gz emacs-98ce16221ecdc66fe440a0ccc61d05fab1c71748.zip | |
(frame_buffer_predicate): New arg FRAME.
(frame_buffer_list, set_frame_buffer_list): Likewise.
(make_frame): Pass new arg to Fother_buffer.
(make_frame_visible_1): New function.
(Fmake_frame_visible): Use that.
Diffstat (limited to 'src')
| -rw-r--r-- | src/frame.c | 48 |
1 files changed, 39 insertions, 9 deletions
diff --git a/src/frame.c b/src/frame.c index 7d461089471..6648a9b384d 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -356,7 +356,7 @@ make_frame (mini_p) | |||
| 356 | /* If buf is a 'hidden' buffer (i.e. one whose name starts with | 356 | /* If buf is a 'hidden' buffer (i.e. one whose name starts with |
| 357 | a space), try to find another one. */ | 357 | a space), try to find another one. */ |
| 358 | if (XSTRING (Fbuffer_name (buf))->data[0] == ' ') | 358 | if (XSTRING (Fbuffer_name (buf))->data[0] == ' ') |
| 359 | buf = Fother_buffer (buf, Qnil); | 359 | buf = Fother_buffer (buf, Qnil, Qnil); |
| 360 | Fset_window_buffer (root_window, buf); | 360 | Fset_window_buffer (root_window, buf); |
| 361 | 361 | ||
| 362 | f->buffer_list = Fcons (buf, Qnil); | 362 | f->buffer_list = Fcons (buf, Qnil); |
| @@ -1424,6 +1424,8 @@ before calling this function on it, like this.\n\ | |||
| 1424 | return Qnil; | 1424 | return Qnil; |
| 1425 | } | 1425 | } |
| 1426 | 1426 | ||
| 1427 | static void make_frame_visible_1 P_ ((Lisp_Object)); | ||
| 1428 | |||
| 1427 | DEFUN ("make-frame-visible", Fmake_frame_visible, Smake_frame_visible, | 1429 | DEFUN ("make-frame-visible", Fmake_frame_visible, Smake_frame_visible, |
| 1428 | 0, 1, "", | 1430 | 0, 1, "", |
| 1429 | "Make the frame FRAME visible (assuming it is an X-window).\n\ | 1431 | "Make the frame FRAME visible (assuming it is an X-window).\n\ |
| @@ -1445,12 +1447,37 @@ If omitted, FRAME defaults to the currently selected frame.") | |||
| 1445 | } | 1447 | } |
| 1446 | #endif | 1448 | #endif |
| 1447 | 1449 | ||
| 1450 | make_frame_visible_1 (XFRAME (frame)->root_window); | ||
| 1451 | |||
| 1448 | /* Make menu bar update for the Buffers and Frams menus. */ | 1452 | /* Make menu bar update for the Buffers and Frams menus. */ |
| 1449 | windows_or_buffers_changed++; | 1453 | windows_or_buffers_changed++; |
| 1450 | 1454 | ||
| 1451 | return frame; | 1455 | return frame; |
| 1452 | } | 1456 | } |
| 1453 | 1457 | ||
| 1458 | /* Update the display_time slot of the buffers shown in WINDOW | ||
| 1459 | and all its descendents. */ | ||
| 1460 | |||
| 1461 | static void | ||
| 1462 | make_frame_visible_1 (window) | ||
| 1463 | Lisp_Object window; | ||
| 1464 | { | ||
| 1465 | struct window *w; | ||
| 1466 | |||
| 1467 | for (;!NILP (window); window = w->next) | ||
| 1468 | { | ||
| 1469 | w = XWINDOW (window); | ||
| 1470 | |||
| 1471 | if (!NILP (w->buffer)) | ||
| 1472 | XBUFFER (w->buffer)->display_time = Fcurrent_time (); | ||
| 1473 | |||
| 1474 | if (!NILP (w->vchild)) | ||
| 1475 | make_frame_visible_1 (w->vchild); | ||
| 1476 | if (!NILP (w->hchild)) | ||
| 1477 | make_frame_visible_1 (w->hchild); | ||
| 1478 | } | ||
| 1479 | } | ||
| 1480 | |||
| 1454 | DEFUN ("make-frame-invisible", Fmake_frame_invisible, Smake_frame_invisible, | 1481 | DEFUN ("make-frame-invisible", Fmake_frame_invisible, Smake_frame_invisible, |
| 1455 | 0, 2, "", | 1482 | 0, 2, "", |
| 1456 | "Make the frame FRAME invisible (assuming it is an X-window).\n\ | 1483 | "Make the frame FRAME invisible (assuming it is an X-window).\n\ |
| @@ -1696,26 +1723,28 @@ get_frame_param (frame, prop) | |||
| 1696 | /* Return the buffer-predicate of the selected frame. */ | 1723 | /* Return the buffer-predicate of the selected frame. */ |
| 1697 | 1724 | ||
| 1698 | Lisp_Object | 1725 | Lisp_Object |
| 1699 | frame_buffer_predicate () | 1726 | frame_buffer_predicate (frame) |
| 1727 | Lisp_Object frame; | ||
| 1700 | { | 1728 | { |
| 1701 | return selected_frame->buffer_predicate; | 1729 | return XFRAME (frame)->buffer_predicate; |
| 1702 | } | 1730 | } |
| 1703 | 1731 | ||
| 1704 | /* Return the buffer-list of the selected frame. */ | 1732 | /* Return the buffer-list of the selected frame. */ |
| 1705 | 1733 | ||
| 1706 | Lisp_Object | 1734 | Lisp_Object |
| 1707 | frame_buffer_list () | 1735 | frame_buffer_list (frame) |
| 1736 | Lisp_Object frame; | ||
| 1708 | { | 1737 | { |
| 1709 | return selected_frame->buffer_list; | 1738 | return XFRAME (frame)->buffer_list; |
| 1710 | } | 1739 | } |
| 1711 | 1740 | ||
| 1712 | /* Set the buffer-list of the selected frame. */ | 1741 | /* Set the buffer-list of the selected frame. */ |
| 1713 | 1742 | ||
| 1714 | void | 1743 | void |
| 1715 | set_frame_buffer_list (list) | 1744 | set_frame_buffer_list (frame, list) |
| 1716 | Lisp_Object list; | 1745 | Lisp_Object frame, list; |
| 1717 | { | 1746 | { |
| 1718 | selected_frame->buffer_list = list; | 1747 | XFRAME (frame)->buffer_list = list; |
| 1719 | } | 1748 | } |
| 1720 | 1749 | ||
| 1721 | /* Discard BUFFER from the buffer-list of each frame. */ | 1750 | /* Discard BUFFER from the buffer-list of each frame. */ |
| @@ -1920,7 +1949,8 @@ If FRAME is omitted, return information on the currently selected frame.") | |||
| 1920 | : FRAME_MINIBUF_ONLY_P (f) ? Qonly | 1949 | : FRAME_MINIBUF_ONLY_P (f) ? Qonly |
| 1921 | : FRAME_MINIBUF_WINDOW (f))); | 1950 | : FRAME_MINIBUF_WINDOW (f))); |
| 1922 | store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil)); | 1951 | store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil)); |
| 1923 | store_in_alist (&alist, Qbuffer_list, frame_buffer_list ()); | 1952 | store_in_alist (&alist, Qbuffer_list, |
| 1953 | frame_buffer_list (Fselected_frame ())); | ||
| 1924 | 1954 | ||
| 1925 | /* I think this should be done with a hook. */ | 1955 | /* I think this should be done with a hook. */ |
| 1926 | #ifdef HAVE_WINDOW_SYSTEM | 1956 | #ifdef HAVE_WINDOW_SYSTEM |