comparison src/window.c @ 4145:a0b726903a1f

* window.c [not MULTI_FRAME] (Fdelete_windows_on): Set FRAME argument to Qt, instead of trying to typecheck it. * window.c (Fdelete_windows_on): New optional argument FRAME; if nil, delete windows on all frames. If t, delete windows on the selected frame only. If a frame, delete windows on that frame only. * window.c (Fnext_window, Fprevious_window): Put these docstrings in comments; the strings are too long for some C compilers.
author Jim Blandy <jimb@redhat.com>
date Sun, 18 Jul 1993 06:28:40 +0000
parents c267c2431d92
children 990f6ee7f527
comparison
equal deleted inserted replaced
4144:8f5545cf9774 4145:a0b726903a1f
799 } 799 }
800 800
801 801
802 extern Lisp_Object next_frame (), prev_frame (); 802 extern Lisp_Object next_frame (), prev_frame ();
803 803
804 DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0, 804 /* This comment supplies the doc string for `next-window',
805 for make-docfile to see. We cannot put this in the real DEFUN
806 due to limits in the Unix cpp.
807
808 DEFUN ("next-window", Ffoo, Sfoo, 0, 3, 0,
805 "Return next window after WINDOW in canonical ordering of windows.\n\ 809 "Return next window after WINDOW in canonical ordering of windows.\n\
806 If omitted, WINDOW defaults to the selected window.\n\ 810 If omitted, WINDOW defaults to the selected window.\n\
807 \n\ 811 \n\
808 Optional second arg MINIBUF t means count the minibuffer window even\n\ 812 Optional second arg MINIBUF t means count the minibuffer window even\n\
809 if not active. MINIBUF nil or omitted means count the minibuffer iff\n\ 813 if not active. MINIBUF nil or omitted means count the minibuffer iff\n\
822 \n\ 826 \n\
823 If you use consistent values for MINIBUF and ALL-FRAMES, you can use\n\ 827 If you use consistent values for MINIBUF and ALL-FRAMES, you can use\n\
824 `next-window' to iterate through the entire cycle of acceptable\n\ 828 `next-window' to iterate through the entire cycle of acceptable\n\
825 windows, eventually ending up back at the window you started with.\n\ 829 windows, eventually ending up back at the window you started with.\n\
826 `previous-window' traverses the same cycle, in the reverse order.") 830 `previous-window' traverses the same cycle, in the reverse order.")
831 (window, minibuf, all_frames) */
832
833 DEFUN ("next-window", Fnext_window, Snext_window, 0, 3, 0,
834 0)
827 (window, minibuf, all_frames) 835 (window, minibuf, all_frames)
828 register Lisp_Object window, minibuf, all_frames; 836 register Lisp_Object window, minibuf, all_frames;
829 { 837 {
830 register Lisp_Object tem; 838 register Lisp_Object tem;
831 Lisp_Object start_window; 839 Lisp_Object start_window;
903 && ! EQ (window, start_window)); 911 && ! EQ (window, start_window));
904 912
905 return window; 913 return window;
906 } 914 }
907 915
908 DEFUN ("previous-window", Fprevious_window, Sprevious_window, 0, 3, 0, 916 /* This comment supplies the doc string for `previous-window',
917 for make-docfile to see. We cannot put this in the real DEFUN
918 due to limits in the Unix cpp.
919
920 DEFUN ("previous-window", Ffoo, Sfoo, 0, 3, 0,
909 "Return the window preceeding WINDOW in canonical ordering of windows.\n\ 921 "Return the window preceeding WINDOW in canonical ordering of windows.\n\
910 If omitted, WINDOW defaults to the selected window.\n\ 922 If omitted, WINDOW defaults to the selected window.\n\
911 \n\ 923 \n\
912 Optional second arg MINIBUF t means count the minibuffer window even\n\ 924 Optional second arg MINIBUF t means count the minibuffer window even\n\
913 if not active. MINIBUF nil or omitted means count the minibuffer iff\n\ 925 if not active. MINIBUF nil or omitted means count the minibuffer iff\n\
927 \n\ 939 \n\
928 If you use consistent values for MINIBUF and ALL-FRAMES, you can use\n\ 940 If you use consistent values for MINIBUF and ALL-FRAMES, you can use\n\
929 `previous-window' to iterate through the entire cycle of acceptable\n\ 941 `previous-window' to iterate through the entire cycle of acceptable\n\
930 windows, eventually ending up back at the window you started with.\n\ 942 windows, eventually ending up back at the window you started with.\n\
931 `next-window' traverses the same cycle, in the reverse order.") 943 `next-window' traverses the same cycle, in the reverse order.")
944 (window, minibuf, all_frames) */
945
946
947 DEFUN ("previous-window", Fprevious_window, Sprevious_window, 0, 3, 0,
948 0)
932 (window, minibuf, all_frames) 949 (window, minibuf, all_frames)
933 register Lisp_Object window, minibuf, all_frames; 950 register Lisp_Object window, minibuf, all_frames;
934 { 951 {
935 register Lisp_Object tem; 952 register Lisp_Object tem;
936 Lisp_Object start_window; 953 Lisp_Object start_window;
1317 return Qnil; 1334 return Qnil;
1318 } 1335 }
1319 1336
1320 DEFUN ("delete-windows-on", Fdelete_windows_on, Sdelete_windows_on, 1337 DEFUN ("delete-windows-on", Fdelete_windows_on, Sdelete_windows_on,
1321 1, 1, "bDelete windows on (buffer): ", 1338 1, 1, "bDelete windows on (buffer): ",
1322 "Delete all windows showing BUFFER.") 1339 "Delete all windows showing BUFFER.\n\
1323 (buffer) 1340 Optional second argument FRAME controls which frames are affected.\n\
1324 Lisp_Object buffer; 1341 If nil or omitted, delete all windows showing BUFFER in any frame.\n\
1325 { 1342 If t, delete only windows showing BUFFER in the selected frame.\n\
1343 If a frame, delete only windows showing BUFFER in that frame.")
1344 (buffer, frame)
1345 Lisp_Object buffer, frame;
1346 {
1347 #ifdef MULTI_FRAME
1348 /* FRAME uses t and nil to mean the opposite of what window_loop
1349 expects. */
1350 if (! FRAMEP (frame))
1351 frame = NILP (frame) ? Qt : Qnil;
1352 #else
1353 frame = Qt;
1354 #endif
1355
1326 if (!NILP (buffer)) 1356 if (!NILP (buffer))
1327 { 1357 {
1328 buffer = Fget_buffer (buffer); 1358 buffer = Fget_buffer (buffer);
1329 CHECK_BUFFER (buffer, 0); 1359 CHECK_BUFFER (buffer, 0);
1330 window_loop (DELETE_BUFFER_WINDOWS, buffer, 0, Qt); 1360 window_loop (DELETE_BUFFER_WINDOWS, buffer, 0, frame);
1331 } 1361 }
1332 return Qnil; 1362 return Qnil;
1333 } 1363 }
1334 1364
1335 DEFUN ("replace-buffer-in-windows", Freplace_buffer_in_windows, 1365 DEFUN ("replace-buffer-in-windows", Freplace_buffer_in_windows,