aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorJim Blandy1993-01-26 01:58:16 +0000
committerJim Blandy1993-01-26 01:58:16 +0000
commitdbc4e1c12940079cad7b24e1654a0badcda8d6fc (patch)
treee0fbea5b15bd13d2839c8b59b624cec80f31bfd8 /src/window.c
parent72766144811cd7258b2a59e56f6e3657537ea508 (diff)
downloademacs-dbc4e1c12940079cad7b24e1654a0badcda8d6fc.tar.gz
emacs-dbc4e1c12940079cad7b24e1654a0badcda8d6fc.zip
JimB's changes since January 18th
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c48
1 files changed, 36 insertions, 12 deletions
diff --git a/src/window.c b/src/window.c
index a14599bf786..b788c8f3fae 100644
--- a/src/window.c
+++ b/src/window.c
@@ -60,9 +60,6 @@ Lisp_Object Vminibuf_scroll_window;
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. */
61Lisp_Object Vother_window_scroll_buffer; 61Lisp_Object Vother_window_scroll_buffer;
62 62
63/* Window that the mouse is over (nil if no mouse support). */
64Lisp_Object Vmouse_window;
65
66/* Last mouse click data structure (nil if no mouse support). */ 63/* Last mouse click data structure (nil if no mouse support). */
67Lisp_Object Vmouse_event; 64Lisp_Object Vmouse_event;
68 65
@@ -811,7 +808,12 @@ minibuffer does not count, only windows from WINDOW's frame count.\n\
811\n\ 808\n\
812Optional third arg ALL-FRAMES t means include windows on all frames.\n\ 809Optional third arg ALL-FRAMES t means include windows on all frames.\n\
813ALL-FRAMES nil or omitted means cycle within the frames as specified\n\ 810ALL-FRAMES nil or omitted means cycle within the frames as specified\n\
814above. If neither nil nor t, restrict to WINDOW's frame.") 811above. If neither nil nor t, restrict to WINDOW's frame.\n\
812\n\
813If 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\
815windows, 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{
@@ -908,7 +910,12 @@ count.\n\
908\n\ 910\n\
909Optional third arg ALL-FRAMES t means include windows on all frames.\n\ 911Optional third arg ALL-FRAMES t means include windows on all frames.\n\
910ALL-FRAMES nil or omitted means cycle within the frames as specified\n\ 912ALL-FRAMES nil or omitted means cycle within the frames as specified\n\
911above. If neither nil nor t, restrict to WINDOW's frame.") 913above. If neither nil nor t, restrict to WINDOW's frame.\n\
914\n\
915If 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\
917windows, 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{
@@ -955,7 +962,16 @@ above. If neither nil nor t, restrict to WINDOW's frame.")
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
@@ -2205,8 +2221,20 @@ showing that buffer, popping the buffer up if necessary.")
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))
@@ -2866,10 +2894,6 @@ Commands such as `switch-to-buffer-other-window' and `find-file-other-window'\n\
2866work using this function."); 2894work using this function.");
2867 Vdisplay_buffer_function = Qnil; 2895 Vdisplay_buffer_function = Qnil;
2868 2896
2869 DEFVAR_LISP ("mouse-window", &Vmouse_window,
2870 "Window that the last mouse click occurred on.");
2871 Vmouse_window = Qnil;
2872
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\