diff options
| author | Richard M. Stallman | 1994-07-07 06:34:07 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-07-07 06:34:07 +0000 |
| commit | f812f9c6b849ddc69ed4a955c5e4029bc46d65cf (patch) | |
| tree | b71161c59faa5a15dbc5e27987de82a3439ab0a6 /src | |
| parent | 5511b568594a609ad615271455b57f0184835c8a (diff) | |
| download | emacs-f812f9c6b849ddc69ed4a955c5e4029bc46d65cf.tar.gz emacs-f812f9c6b849ddc69ed4a955c5e4029bc46d65cf.zip | |
(Fnext_window, Fprevious_window): ALL_FRAMES = 0 means
try both visible frames and iconified frames.
(window_loop): Likewise, for FRAMES = 0.
(Fget_buffer_window): Likewise, for FRAME = 0.
(Fdisplay_buffer): Pass 0 to Fget_buffer_window;
if the frame is iconified, make it visible.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c index 9c601be8cc7..6205343d85b 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -850,6 +850,7 @@ minibuffer does not count, only windows from WINDOW's frame count.\n\ | |||
| 850 | Optional third arg ALL-FRAMES t means include windows on all frames.\n\ | 850 | Optional third arg ALL-FRAMES t means include windows on all frames.\n\ |
| 851 | ALL-FRAMES nil or omitted means cycle within the frames as specified\n\ | 851 | ALL-FRAMES nil or omitted means cycle within the frames as specified\n\ |
| 852 | above. ALL-FRAMES = `visible' means include windows on all visible frames.\n\ | 852 | above. ALL-FRAMES = `visible' means include windows on all visible frames.\n\ |
| 853 | ALL-FRAMES = 0 means include windows on all visible and iconified frames.\n\ | ||
| 853 | Anything else means restrict to WINDOW's frame.\n\ | 854 | Anything else means restrict to WINDOW's frame.\n\ |
| 854 | \n\ | 855 | \n\ |
| 855 | If you use consistent values for MINIBUF and ALL-FRAMES, you can use\n\ | 856 | If you use consistent values for MINIBUF and ALL-FRAMES, you can use\n\ |
| @@ -890,10 +891,14 @@ DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0, | |||
| 890 | : Qnil); | 891 | : Qnil); |
| 891 | else if (EQ (all_frames, Qvisible)) | 892 | else if (EQ (all_frames, Qvisible)) |
| 892 | ; | 893 | ; |
| 894 | else if (XFASTINT (all_frames) == 0) | ||
| 895 | ; | ||
| 893 | else if (! EQ (all_frames, Qt)) | 896 | else if (! EQ (all_frames, Qt)) |
| 894 | all_frames = Qnil; | 897 | all_frames = Qnil; |
| 895 | /* Now all_frames is t meaning search all frames, | 898 | /* Now all_frames is t meaning search all frames, |
| 896 | nil meaning search just current frame, | 899 | nil meaning search just current frame, |
| 900 | visible meaning search just visible frames, | ||
| 901 | 0 meaning search visible and iconified frames, | ||
| 897 | or a window, meaning search the frame that window belongs to. */ | 902 | or a window, meaning search the frame that window belongs to. */ |
| 898 | #endif | 903 | #endif |
| 899 | 904 | ||
| @@ -967,6 +972,7 @@ the minibuffer does not count, only windows from WINDOW's frame count\n\ | |||
| 967 | Optional third arg ALL-FRAMES t means include windows on all frames.\n\ | 972 | Optional third arg ALL-FRAMES t means include windows on all frames.\n\ |
| 968 | ALL-FRAMES nil or omitted means cycle within the frames as specified\n\ | 973 | ALL-FRAMES nil or omitted means cycle within the frames as specified\n\ |
| 969 | above. ALL-FRAMES = `visible' means include windows on all visible frames.\n\ | 974 | above. ALL-FRAMES = `visible' means include windows on all visible frames.\n\ |
| 975 | ALL-FRAMES = 0 means include windows on all visible and iconified frames.\n\ | ||
| 970 | Anything else means restrict to WINDOW's frame.\n\ | 976 | Anything else means restrict to WINDOW's frame.\n\ |
| 971 | \n\ | 977 | \n\ |
| 972 | If you use consistent values for MINIBUF and ALL-FRAMES, you can use\n\ | 978 | If you use consistent values for MINIBUF and ALL-FRAMES, you can use\n\ |
| @@ -1008,10 +1014,14 @@ DEFUN ("previous-window", Fprevious_window, Sprevious_window, 0, 3, 0, | |||
| 1008 | : Qnil); | 1014 | : Qnil); |
| 1009 | else if (EQ (all_frames, Qvisible)) | 1015 | else if (EQ (all_frames, Qvisible)) |
| 1010 | ; | 1016 | ; |
| 1017 | else if (XFASTINT (all_frames) == 0) | ||
| 1018 | ; | ||
| 1011 | else if (! EQ (all_frames, Qt)) | 1019 | else if (! EQ (all_frames, Qt)) |
| 1012 | all_frames = Qnil; | 1020 | all_frames = Qnil; |
| 1013 | /* Now all_frames is t meaning search all frames, | 1021 | /* Now all_frames is t meaning search all frames, |
| 1014 | nil meaning search just current frame, | 1022 | nil meaning search just current frame, |
| 1023 | visible meaning search just visible frames, | ||
| 1024 | 0 meaning search visible and iconified frames, | ||
| 1015 | or a window, meaning search the frame that window belongs to. */ | 1025 | or a window, meaning search the frame that window belongs to. */ |
| 1016 | #endif | 1026 | #endif |
| 1017 | 1027 | ||
| @@ -1154,6 +1164,8 @@ window_loop (type, obj, mini, frames) | |||
| 1154 | frame = 0; | 1164 | frame = 0; |
| 1155 | if (frame) | 1165 | if (frame) |
| 1156 | frame_arg = Qlambda; | 1166 | frame_arg = Qlambda; |
| 1167 | else if (XFASTINT (frames) == 0) | ||
| 1168 | frame_arg = frames; | ||
| 1157 | else if (EQ (frames, Qvisible)) | 1169 | else if (EQ (frames, Qvisible)) |
| 1158 | frame_arg = frames; | 1170 | frame_arg = frames; |
| 1159 | #else | 1171 | #else |
| @@ -1332,6 +1344,7 @@ If FRAME is a frame, search only that frame.") | |||
| 1332 | DEFUN ("get-buffer-window", Fget_buffer_window, Sget_buffer_window, 1, 2, 0, | 1344 | DEFUN ("get-buffer-window", Fget_buffer_window, Sget_buffer_window, 1, 2, 0, |
| 1333 | "Return a window currently displaying BUFFER, or nil if none.\n\ | 1345 | "Return a window currently displaying BUFFER, or nil if none.\n\ |
| 1334 | If optional argument FRAME is `visible', search all visible frames.\n\ | 1346 | If optional argument FRAME is `visible', search all visible frames.\n\ |
| 1347 | If optional argument FRAME is 0, search all visible and iconified frames.\n\ | ||
| 1335 | If FRAME is t, search all frames.\n\ | 1348 | If FRAME is t, search all frames.\n\ |
| 1336 | If FRAME is nil, search only the selected frame.\n\ | 1349 | If FRAME is nil, search only the selected frame.\n\ |
| 1337 | If FRAME is a frame, search only that frame.") | 1350 | If FRAME is a frame, search only that frame.") |
| @@ -1752,14 +1765,18 @@ Returns the window displaying BUFFER.") | |||
| 1752 | 1765 | ||
| 1753 | #ifdef MULTI_FRAME | 1766 | #ifdef MULTI_FRAME |
| 1754 | /* If pop_up_frames, | 1767 | /* If pop_up_frames, |
| 1755 | look for a window showing BUFFER on any visible frame. */ | 1768 | look for a window showing BUFFER on any visible or iconified frame. */ |
| 1756 | window = Fget_buffer_window (buffer, pop_up_frames ? Qvisible : Qnil); | 1769 | window = Fget_buffer_window (buffer, pop_up_frames ? make_number (0) : Qnil); |
| 1757 | #else | 1770 | #else |
| 1758 | window = Fget_buffer_window (buffer, Qnil); | 1771 | window = Fget_buffer_window (buffer, Qnil); |
| 1759 | #endif | 1772 | #endif |
| 1760 | if (!NILP (window) | 1773 | if (!NILP (window) |
| 1761 | && (NILP (not_this_window) || !EQ (window, selected_window))) | 1774 | && (NILP (not_this_window) || !EQ (window, selected_window))) |
| 1762 | return window; | 1775 | { |
| 1776 | if (FRAME_ICONIFIED_P (XFRAME (WINDOW_FRAME (XWINDOW (window))))) | ||
| 1777 | Fmake_frame_visible (WINDOW_FRAME (XWINDOW (window))); | ||
| 1778 | return window; | ||
| 1779 | } | ||
| 1763 | 1780 | ||
| 1764 | /* Certain buffer names get special handling. */ | 1781 | /* Certain buffer names get special handling. */ |
| 1765 | if (! NILP (Vspecial_display_function)) | 1782 | if (! NILP (Vspecial_display_function)) |