diff options
| author | Jim Blandy | 1993-07-18 06:28:40 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-07-18 06:28:40 +0000 |
| commit | 26f6279de146740079aefaacffcbee8d450cc740 (patch) | |
| tree | 987cceb44ab60025765586e97da70367ccaaebea /src | |
| parent | ad9c19400fd3e55d6fe78a7aa582bdc94cd8b3cc (diff) | |
| download | emacs-26f6279de146740079aefaacffcbee8d450cc740.tar.gz emacs-26f6279de146740079aefaacffcbee8d450cc740.zip | |
* 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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/src/window.c b/src/window.c index a9ab938d2cb..89e65de1637 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -801,7 +801,11 @@ DEFUN ("delete-window", Fdelete_window, Sdelete_window, 0, 1, "", | |||
| 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\ |
| @@ -824,6 +828,10 @@ 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 | { |
| @@ -905,7 +913,11 @@ windows, eventually ending up back at the window you started with.\n\ | |||
| 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\ |
| @@ -929,6 +941,11 @@ 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 | { |
| @@ -1319,15 +1336,28 @@ Only the frame WINDOW is on is affected.") | |||
| 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\ |
| 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; | ||
| 1325 | { | 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 | } |