Mercurial > emacs
comparison src/window.c @ 1821:04fb1d3d6992
JimB's changes since January 18th
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Tue, 26 Jan 1993 01:58:16 +0000 |
parents | 7ba5cfe280eb |
children | 514384c3689d |
comparison
equal
deleted
inserted
replaced
1820:b95bdb97c3e8 | 1821:04fb1d3d6992 |
---|---|
57 when the minibuffer is selected. */ | 57 when the minibuffer is selected. */ |
58 Lisp_Object Vminibuf_scroll_window; | 58 Lisp_Object Vminibuf_scroll_window; |
59 | 59 |
60 /* Non-nil means this is the buffer whose window C-M-v should scroll. */ | 60 /* Non-nil means this is the buffer whose window C-M-v should scroll. */ |
61 Lisp_Object Vother_window_scroll_buffer; | 61 Lisp_Object Vother_window_scroll_buffer; |
62 | |
63 /* Window that the mouse is over (nil if no mouse support). */ | |
64 Lisp_Object Vmouse_window; | |
65 | 62 |
66 /* Last mouse click data structure (nil if no mouse support). */ | 63 /* Last mouse click data structure (nil if no mouse support). */ |
67 Lisp_Object Vmouse_event; | 64 Lisp_Object Vmouse_event; |
68 | 65 |
69 /* Non-nil means it's function to call to display temp buffers. */ | 66 /* Non-nil means it's function to call to display temp buffers. */ |
809 set of windows even when the minibuffer is on another frame. If the\n\ | 806 set of windows even when the minibuffer is on another frame. If the\n\ |
810 minibuffer does not count, only windows from WINDOW's frame count.\n\ | 807 minibuffer does not count, only windows from WINDOW's frame count.\n\ |
811 \n\ | 808 \n\ |
812 Optional third arg ALL-FRAMES t means include windows on all frames.\n\ | 809 Optional third arg ALL-FRAMES t means include windows on all frames.\n\ |
813 ALL-FRAMES nil or omitted means cycle within the frames as specified\n\ | 810 ALL-FRAMES nil or omitted means cycle within the frames as specified\n\ |
814 above. If neither nil nor t, restrict to WINDOW's frame.") | 811 above. If neither nil nor t, restrict to WINDOW's frame.\n\ |
812 \n\ | |
813 If you use consistent values for MINIBUF and ALL-FRAMES, you can use\n\ | |
814 `next-window' to iterate through the entire cycle of acceptable\n\ | |
815 windows, eventually ending up back at the window you started with.\n\ | |
816 `previous-window' traverses the same cycle, in the reverse order.") | |
815 (window, minibuf, all_frames) | 817 (window, minibuf, all_frames) |
816 register Lisp_Object window, minibuf, all_frames; | 818 register Lisp_Object window, minibuf, all_frames; |
817 { | 819 { |
818 register Lisp_Object tem; | 820 register Lisp_Object tem; |
819 Lisp_Object start_window; | 821 Lisp_Object start_window; |
906 the minibuffer does not count, only windows from WINDOW's frame\n\ | 908 the minibuffer does not count, only windows from WINDOW's frame\n\ |
907 count.\n\ | 909 count.\n\ |
908 \n\ | 910 \n\ |
909 Optional third arg ALL-FRAMES t means include windows on all frames.\n\ | 911 Optional third arg ALL-FRAMES t means include windows on all frames.\n\ |
910 ALL-FRAMES nil or omitted means cycle within the frames as specified\n\ | 912 ALL-FRAMES nil or omitted means cycle within the frames as specified\n\ |
911 above. If neither nil nor t, restrict to WINDOW's frame.") | 913 above. If neither nil nor t, restrict to WINDOW's frame.\n\ |
914 \n\ | |
915 If you use consistent values for MINIBUF and ALL-FRAMES, you can use\n\ | |
916 `previous-window' to iterate through the entire cycle of acceptable\n\ | |
917 windows, eventually ending up back at the window you started with.\n\ | |
918 `next-window' traverses the same cycle, in the reverse order.") | |
912 (window, minibuf, all_frames) | 919 (window, minibuf, all_frames) |
913 register Lisp_Object window, minibuf, all_frames; | 920 register Lisp_Object window, minibuf, all_frames; |
914 { | 921 { |
915 register Lisp_Object tem; | 922 register Lisp_Object tem; |
916 Lisp_Object start_window; | 923 Lisp_Object start_window; |
953 /* We have found the top window on the frame. | 960 /* We have found the top window on the frame. |
954 Which frames are acceptable? */ | 961 Which frames are acceptable? */ |
955 tem = WINDOW_FRAME (XWINDOW (window)); | 962 tem = WINDOW_FRAME (XWINDOW (window)); |
956 #ifdef MULTI_FRAME | 963 #ifdef MULTI_FRAME |
957 if (! NILP (all_frames)) | 964 if (! NILP (all_frames)) |
958 tem = next_frame (tem, all_frames); | 965 /* It's actually important that we use prev_frame here, |
966 rather than next_frame. All the windows acceptable | |
967 according to the given parameters should form a ring; | |
968 Fnext_window and Fprevious_window should go back and | |
969 forth around the ring. If we use next_frame here, | |
970 then Fnext_window and Fprevious_window take different | |
971 paths through the set of acceptable windows. | |
972 window_loop assumes that these `ring' requirement are | |
973 met. */ | |
974 tem = prev_frame (tem, all_frames); | |
959 #endif | 975 #endif |
960 tem = FRAME_ROOT_WINDOW (XFRAME (tem)); | 976 tem = FRAME_ROOT_WINDOW (XFRAME (tem)); |
961 | 977 |
962 break; | 978 break; |
963 } | 979 } |
2203 window = Fget_buffer_window (Vother_window_scroll_buffer, Qnil); | 2219 window = Fget_buffer_window (Vother_window_scroll_buffer, Qnil); |
2204 if (NILP (window)) | 2220 if (NILP (window)) |
2205 window = Fdisplay_buffer (Vother_window_scroll_buffer, Qt); | 2221 window = Fdisplay_buffer (Vother_window_scroll_buffer, Qt); |
2206 } | 2222 } |
2207 else | 2223 else |
2208 /* Nothing specified; pick a neighboring window. */ | 2224 { |
2209 window = Fnext_window (selected_window, Qnil, Qt); | 2225 /* Nothing specified; look for a neighboring window on the same |
2226 frame. */ | |
2227 window = Fnext_window (selected_window, Qnil, Qnil); | |
2228 | |
2229 if (EQ (window, selected_window)) | |
2230 /* That didn't get us anywhere; look for a window on another | |
2231 visible frame. */ | |
2232 do | |
2233 window = Fnext_window (window, Qnil, Qt); | |
2234 while (! FRAME_VISIBLE_P (XFRAME (WINDOW_FRAME (XWINDOW (window)))) | |
2235 && ! EQ (window, selected_window)); | |
2236 } | |
2237 | |
2210 CHECK_LIVE_WINDOW (window, 0); | 2238 CHECK_LIVE_WINDOW (window, 0); |
2211 | 2239 |
2212 if (EQ (window, selected_window)) | 2240 if (EQ (window, selected_window)) |
2213 error ("There is no other window"); | 2241 error ("There is no other window"); |
2214 | 2242 |
2863 It will receive two args, the buffer and a flag which if non-nil means\n\ | 2891 It will receive two args, the buffer and a flag which if non-nil means\n\ |
2864 that the currently selected window is not acceptable.\n\ | 2892 that the currently selected window is not acceptable.\n\ |
2865 Commands such as `switch-to-buffer-other-window' and `find-file-other-window'\n\ | 2893 Commands such as `switch-to-buffer-other-window' and `find-file-other-window'\n\ |
2866 work using this function."); | 2894 work using this function."); |
2867 Vdisplay_buffer_function = Qnil; | 2895 Vdisplay_buffer_function = Qnil; |
2868 | |
2869 DEFVAR_LISP ("mouse-window", &Vmouse_window, | |
2870 "Window that the last mouse click occurred on."); | |
2871 Vmouse_window = Qnil; | |
2872 | 2896 |
2873 DEFVAR_LISP ("mouse-event", &Vmouse_event, | 2897 DEFVAR_LISP ("mouse-event", &Vmouse_event, |
2874 "The last mouse-event object. A list of four elements:\n\ | 2898 "The last mouse-event object. A list of four elements:\n\ |
2875 ((X-POS Y-POS) WINDOW FRAME-PART KEYSEQ).\n\ | 2899 ((X-POS Y-POS) WINDOW FRAME-PART KEYSEQ).\n\ |
2876 KEYSEQ is a string, the key sequence to be looked up in the mouse maps.\n\ | 2900 KEYSEQ is a string, the key sequence to be looked up in the mouse maps.\n\ |