comparison src/window.c @ 3803:c267c2431d92

Don't let the 'B' interactive spec default to buffers viewed in any visible frame. * buffer.c (Fother_buffer): Pass Qt as the second argument to Fget_buffer_window. * window.c (window_loop): In GET_BUFFER_WINDOW case, ignore non-visible frames. (Fget_buffer_window): Change doc string to mention that passing Qt for the FRAME argument returns windows on visible frames only. (Qvisible): Removed.
author Jim Blandy <jimb@redhat.com>
date Thu, 17 Jun 1993 05:06:36 +0000
parents 3455cbb3339d
children a0b726903a1f
comparison
equal deleted inserted replaced
3802:594bc11c67ba 3803:c267c2431d92
28 #include "termchar.h" 28 #include "termchar.h"
29 #include "disptab.h" 29 #include "disptab.h"
30 #include "keyboard.h" 30 #include "keyboard.h"
31 31
32 Lisp_Object Qwindowp, Qwindow_live_p; 32 Lisp_Object Qwindowp, Qwindow_live_p;
33 Lisp_Object Qvisible;
34 33
35 Lisp_Object Fnext_window (), Fdelete_window (), Fselect_window (); 34 Lisp_Object Fnext_window (), Fdelete_window (), Fselect_window ();
36 Lisp_Object Fset_window_buffer (), Fsplit_window (), Frecenter (); 35 Lisp_Object Fset_window_buffer (), Fsplit_window (), Frecenter ();
37 36
38 void delete_all_subwindows (); 37 void delete_all_subwindows ();
1057 } 1056 }
1058 1057
1059 /* Look at all windows, performing an operation specified by TYPE 1058 /* Look at all windows, performing an operation specified by TYPE
1060 with argument OBJ. 1059 with argument OBJ.
1061 If FRAMES is Qt, look at all frames; 1060 If FRAMES is Qt, look at all frames;
1062 Qvisible, look at visible frames (GET_BUFFER_WINDOW only);
1063 Qnil, look at just the selected frame; 1061 Qnil, look at just the selected frame;
1064 a frame, just look at windows on that frame. 1062 a frame, just look at windows on that frame.
1065 If MINI is non-zero, perform the operation on minibuffer windows too. 1063 If MINI is non-zero, perform the operation on minibuffer windows too.
1066 */ 1064 */
1067 1065
1145 if (! MINI_WINDOW_P (XWINDOW (w)) 1143 if (! MINI_WINDOW_P (XWINDOW (w))
1146 || (mini && minibuf_level > 0)) 1144 || (mini && minibuf_level > 0))
1147 switch (type) 1145 switch (type)
1148 { 1146 {
1149 case GET_BUFFER_WINDOW: 1147 case GET_BUFFER_WINDOW:
1150 /* Perhaps ignore invisible and iconified frames. */ 1148 /* Ignore invisible and iconified frames. */
1151 if (EQ (frames, Qvisible) 1149 if (! FRAME_VISIBLE_P (w_frame)
1152 && (! FRAME_VISIBLE_P (w_frame) 1150 || FRAME_ICONIFIED_P (w_frame))
1153 || FRAME_ICONIFIED_P (w_frame)))
1154 break; 1151 break;
1155 if (XBUFFER (XWINDOW (w)->buffer) == XBUFFER (obj)) 1152 if (XBUFFER (XWINDOW (w)->buffer) == XBUFFER (obj))
1156 return w; 1153 return w;
1157 break; 1154 break;
1158 1155
1274 frame); 1271 frame);
1275 } 1272 }
1276 1273
1277 DEFUN ("get-buffer-window", Fget_buffer_window, Sget_buffer_window, 1, 2, 0, 1274 DEFUN ("get-buffer-window", Fget_buffer_window, Sget_buffer_window, 1, 2, 0,
1278 "Return a window currently displaying BUFFER, or nil if none.\n\ 1275 "Return a window currently displaying BUFFER, or nil if none.\n\
1279 If optional argument FRAME is t, search all frames.\n\ 1276 If optional argument FRAME is t, search all visible frames.\n\
1280 If FRAME is `visible', search all visible frames.\n\ 1277 If FRAME is nil, search only the selected frame.\n\
1281 If FRAME is a frame, search only that frame.\n") 1278 If FRAME is a frame, search only that frame.\n")
1282 (buffer, frame) 1279 (buffer, frame)
1283 Lisp_Object buffer, frame; 1280 Lisp_Object buffer, frame;
1284 { 1281 {
1285 buffer = Fget_buffer (buffer); 1282 buffer = Fget_buffer (buffer);
2898 Qwindowp = intern ("windowp"); 2895 Qwindowp = intern ("windowp");
2899 staticpro (&Qwindowp); 2896 staticpro (&Qwindowp);
2900 2897
2901 Qwindow_live_p = intern ("window-live-p"); 2898 Qwindow_live_p = intern ("window-live-p");
2902 staticpro (&Qwindow_live_p); 2899 staticpro (&Qwindow_live_p);
2903
2904 Qvisible = intern ("Qvisible");
2905 staticpro (&Qvisible);
2906 2900
2907 #ifndef MULTI_FRAME 2901 #ifndef MULTI_FRAME
2908 /* Make sure all windows get marked */ 2902 /* Make sure all windows get marked */
2909 staticpro (&minibuf_window); 2903 staticpro (&minibuf_window);
2910 #endif 2904 #endif