diff options
| author | Pavel Janík | 2001-11-02 20:46:55 +0000 |
|---|---|---|
| committer | Pavel Janík | 2001-11-02 20:46:55 +0000 |
| commit | b78265036088d5d0eac2a03b929adb50aa59b45c (patch) | |
| tree | de99fe733144deb926fd31ee7bdff95cb1bc5073 /src/window.c | |
| parent | 00a2cef7d11a1b193891eb3d28274ef7fc7c3fe4 (diff) | |
| download | emacs-b78265036088d5d0eac2a03b929adb50aa59b45c.tar.gz emacs-b78265036088d5d0eac2a03b929adb50aa59b45c.zip | |
Update usage of CHECK_ macros (remove unused second argument).
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/src/window.c b/src/window.c index 4ac39dde882..94a9678baac 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -294,7 +294,7 @@ used by that frame. */) | |||
| 294 | { | 294 | { |
| 295 | if (NILP (frame)) | 295 | if (NILP (frame)) |
| 296 | frame = selected_frame; | 296 | frame = selected_frame; |
| 297 | CHECK_LIVE_FRAME (frame, 0); | 297 | CHECK_LIVE_FRAME (frame); |
| 298 | return FRAME_MINIBUF_WINDOW (XFRAME (frame)); | 298 | return FRAME_MINIBUF_WINDOW (XFRAME (frame)); |
| 299 | } | 299 | } |
| 300 | 300 | ||
| @@ -331,7 +331,7 @@ POS defaults to point in WINDOW; WINDOW defaults to the selected window. */) | |||
| 331 | 331 | ||
| 332 | if (!NILP (pos)) | 332 | if (!NILP (pos)) |
| 333 | { | 333 | { |
| 334 | CHECK_NUMBER_COERCE_MARKER (pos, 0); | 334 | CHECK_NUMBER_COERCE_MARKER (pos); |
| 335 | posint = XINT (pos); | 335 | posint = XINT (pos); |
| 336 | } | 336 | } |
| 337 | else if (w == XWINDOW (selected_window)) | 337 | else if (w == XWINDOW (selected_window)) |
| @@ -382,7 +382,7 @@ decode_window (window) | |||
| 382 | if (NILP (window)) | 382 | if (NILP (window)) |
| 383 | return XWINDOW (selected_window); | 383 | return XWINDOW (selected_window); |
| 384 | 384 | ||
| 385 | CHECK_LIVE_WINDOW (window, 0); | 385 | CHECK_LIVE_WINDOW (window); |
| 386 | return XWINDOW (window); | 386 | return XWINDOW (window); |
| 387 | } | 387 | } |
| 388 | 388 | ||
| @@ -430,7 +430,7 @@ NCOL should be zero or positive. */) | |||
| 430 | struct window *w = decode_window (window); | 430 | struct window *w = decode_window (window); |
| 431 | int hscroll; | 431 | int hscroll; |
| 432 | 432 | ||
| 433 | CHECK_NUMBER (ncol, 1); | 433 | CHECK_NUMBER (ncol); |
| 434 | hscroll = max (0, XINT (ncol)); | 434 | hscroll = max (0, XINT (ncol)); |
| 435 | 435 | ||
| 436 | /* Prevent redisplay shortcuts when changing the hscroll. */ | 436 | /* Prevent redisplay shortcuts when changing the hscroll. */ |
| @@ -678,14 +678,14 @@ If they are on the border between WINDOW and its right sibling, | |||
| 678 | int x, y; | 678 | int x, y; |
| 679 | Lisp_Object lx, ly; | 679 | Lisp_Object lx, ly; |
| 680 | 680 | ||
| 681 | CHECK_LIVE_WINDOW (window, 0); | 681 | CHECK_LIVE_WINDOW (window); |
| 682 | w = XWINDOW (window); | 682 | w = XWINDOW (window); |
| 683 | f = XFRAME (w->frame); | 683 | f = XFRAME (w->frame); |
| 684 | CHECK_CONS (coordinates, 1); | 684 | CHECK_CONS (coordinates); |
| 685 | lx = Fcar (coordinates); | 685 | lx = Fcar (coordinates); |
| 686 | ly = Fcdr (coordinates); | 686 | ly = Fcdr (coordinates); |
| 687 | CHECK_NUMBER_OR_FLOAT (lx, 1); | 687 | CHECK_NUMBER_OR_FLOAT (lx); |
| 688 | CHECK_NUMBER_OR_FLOAT (ly, 1); | 688 | CHECK_NUMBER_OR_FLOAT (ly); |
| 689 | x = PIXEL_X_FROM_CANON_X (f, lx); | 689 | x = PIXEL_X_FROM_CANON_X (f, lx); |
| 690 | y = PIXEL_Y_FROM_CANON_Y (f, ly); | 690 | y = PIXEL_Y_FROM_CANON_Y (f, ly); |
| 691 | 691 | ||
| @@ -816,12 +816,12 @@ column 0. */) | |||
| 816 | 816 | ||
| 817 | if (NILP (frame)) | 817 | if (NILP (frame)) |
| 818 | frame = selected_frame; | 818 | frame = selected_frame; |
| 819 | CHECK_LIVE_FRAME (frame, 2); | 819 | CHECK_LIVE_FRAME (frame); |
| 820 | f = XFRAME (frame); | 820 | f = XFRAME (frame); |
| 821 | 821 | ||
| 822 | /* Check that arguments are integers or floats. */ | 822 | /* Check that arguments are integers or floats. */ |
| 823 | CHECK_NUMBER_OR_FLOAT (x, 0); | 823 | CHECK_NUMBER_OR_FLOAT (x); |
| 824 | CHECK_NUMBER_OR_FLOAT (y, 1); | 824 | CHECK_NUMBER_OR_FLOAT (y); |
| 825 | 825 | ||
| 826 | return window_from_coordinates (f, | 826 | return window_from_coordinates (f, |
| 827 | PIXEL_X_FROM_CANON_X (f, x), | 827 | PIXEL_X_FROM_CANON_X (f, x), |
| @@ -885,7 +885,7 @@ if it isn't already recorded. */) | |||
| 885 | Lisp_Object buf; | 885 | Lisp_Object buf; |
| 886 | 886 | ||
| 887 | buf = w->buffer; | 887 | buf = w->buffer; |
| 888 | CHECK_BUFFER (buf, 0); | 888 | CHECK_BUFFER (buf); |
| 889 | 889 | ||
| 890 | #if 0 /* This change broke some things. We should make it later. */ | 890 | #if 0 /* This change broke some things. We should make it later. */ |
| 891 | /* If we don't know the end position, return nil. | 891 | /* If we don't know the end position, return nil. |
| @@ -946,7 +946,7 @@ DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, | |||
| 946 | { | 946 | { |
| 947 | register struct window *w = decode_window (window); | 947 | register struct window *w = decode_window (window); |
| 948 | 948 | ||
| 949 | CHECK_NUMBER_COERCE_MARKER (pos, 1); | 949 | CHECK_NUMBER_COERCE_MARKER (pos); |
| 950 | if (w == XWINDOW (selected_window) | 950 | if (w == XWINDOW (selected_window) |
| 951 | && XBUFFER (w->buffer) == current_buffer) | 951 | && XBUFFER (w->buffer) == current_buffer) |
| 952 | Fgoto_char (pos); | 952 | Fgoto_char (pos); |
| @@ -970,7 +970,7 @@ from overriding motion of point in order to display at this exact start. */) | |||
| 970 | { | 970 | { |
| 971 | register struct window *w = decode_window (window); | 971 | register struct window *w = decode_window (window); |
| 972 | 972 | ||
| 973 | CHECK_NUMBER_COERCE_MARKER (pos, 1); | 973 | CHECK_NUMBER_COERCE_MARKER (pos); |
| 974 | set_marker_restricted (w->start, pos, w->buffer); | 974 | set_marker_restricted (w->start, pos, w->buffer); |
| 975 | /* this is not right, but much easier than doing what is right. */ | 975 | /* this is not right, but much easier than doing what is right. */ |
| 976 | w->start_at_line_beg = Qnil; | 976 | w->start_at_line_beg = Qnil; |
| @@ -1195,7 +1195,7 @@ delete_window (window) | |||
| 1195 | if (NILP (window)) | 1195 | if (NILP (window)) |
| 1196 | window = selected_window; | 1196 | window = selected_window; |
| 1197 | else | 1197 | else |
| 1198 | CHECK_WINDOW (window, 0); | 1198 | CHECK_WINDOW (window); |
| 1199 | p = XWINDOW (window); | 1199 | p = XWINDOW (window); |
| 1200 | 1200 | ||
| 1201 | /* It's okay to delete an already-deleted window. */ | 1201 | /* It's okay to delete an already-deleted window. */ |
| @@ -1448,7 +1448,7 @@ decode_next_window_args (window, minibuf, all_frames) | |||
| 1448 | if (NILP (*window)) | 1448 | if (NILP (*window)) |
| 1449 | *window = selected_window; | 1449 | *window = selected_window; |
| 1450 | else | 1450 | else |
| 1451 | CHECK_LIVE_WINDOW (*window, 0); | 1451 | CHECK_LIVE_WINDOW (*window); |
| 1452 | 1452 | ||
| 1453 | /* MINIBUF nil may or may not include minibuffers. Decide if it | 1453 | /* MINIBUF nil may or may not include minibuffers. Decide if it |
| 1454 | does. */ | 1454 | does. */ |
| @@ -1632,7 +1632,7 @@ argument ALL_FRAMES is non-nil, cycle through all frames. */) | |||
| 1632 | Lisp_Object window; | 1632 | Lisp_Object window; |
| 1633 | int i; | 1633 | int i; |
| 1634 | 1634 | ||
| 1635 | CHECK_NUMBER (arg, 0); | 1635 | CHECK_NUMBER (arg); |
| 1636 | window = selected_window; | 1636 | window = selected_window; |
| 1637 | 1637 | ||
| 1638 | for (i = XINT (arg); i > 0; --i) | 1638 | for (i = XINT (arg); i > 0; --i) |
| @@ -1990,7 +1990,7 @@ value is reasonable when this function is called. */) | |||
| 1990 | if (NILP (window)) | 1990 | if (NILP (window)) |
| 1991 | window = selected_window; | 1991 | window = selected_window; |
| 1992 | else | 1992 | else |
| 1993 | CHECK_LIVE_WINDOW (window, 0); | 1993 | CHECK_LIVE_WINDOW (window); |
| 1994 | w = XWINDOW (window); | 1994 | w = XWINDOW (window); |
| 1995 | 1995 | ||
| 1996 | startpos = marker_position (w->start); | 1996 | startpos = marker_position (w->start); |
| @@ -2056,7 +2056,7 @@ If FRAME is a frame, search only that frame. */) | |||
| 2056 | if (!NILP (buffer)) | 2056 | if (!NILP (buffer)) |
| 2057 | { | 2057 | { |
| 2058 | buffer = Fget_buffer (buffer); | 2058 | buffer = Fget_buffer (buffer); |
| 2059 | CHECK_BUFFER (buffer, 0); | 2059 | CHECK_BUFFER (buffer); |
| 2060 | window_loop (DELETE_BUFFER_WINDOWS, buffer, 0, frame); | 2060 | window_loop (DELETE_BUFFER_WINDOWS, buffer, 0, frame); |
| 2061 | } | 2061 | } |
| 2062 | 2062 | ||
| @@ -2073,7 +2073,7 @@ DEFUN ("replace-buffer-in-windows", Freplace_buffer_in_windows, | |||
| 2073 | if (!NILP (buffer)) | 2073 | if (!NILP (buffer)) |
| 2074 | { | 2074 | { |
| 2075 | buffer = Fget_buffer (buffer); | 2075 | buffer = Fget_buffer (buffer); |
| 2076 | CHECK_BUFFER (buffer, 0); | 2076 | CHECK_BUFFER (buffer); |
| 2077 | window_loop (UNSHOW_BUFFER, buffer, 0, Qt); | 2077 | window_loop (UNSHOW_BUFFER, buffer, 0, Qt); |
| 2078 | } | 2078 | } |
| 2079 | return Qnil; | 2079 | return Qnil; |
| @@ -2660,7 +2660,7 @@ BUFFER can be a buffer or buffer name. */) | |||
| 2660 | 2660 | ||
| 2661 | XSETWINDOW (window, w); | 2661 | XSETWINDOW (window, w); |
| 2662 | buffer = Fget_buffer (buffer); | 2662 | buffer = Fget_buffer (buffer); |
| 2663 | CHECK_BUFFER (buffer, 1); | 2663 | CHECK_BUFFER (buffer); |
| 2664 | 2664 | ||
| 2665 | if (NILP (XBUFFER (buffer)->name)) | 2665 | if (NILP (XBUFFER (buffer)->name)) |
| 2666 | error ("Attempt to display deleted buffer"); | 2666 | error ("Attempt to display deleted buffer"); |
| @@ -2705,7 +2705,7 @@ select_window_1 (window, recordflag) | |||
| 2705 | register struct window *ow; | 2705 | register struct window *ow; |
| 2706 | struct frame *sf; | 2706 | struct frame *sf; |
| 2707 | 2707 | ||
| 2708 | CHECK_LIVE_WINDOW (window, 0); | 2708 | CHECK_LIVE_WINDOW (window); |
| 2709 | 2709 | ||
| 2710 | w = XWINDOW (window); | 2710 | w = XWINDOW (window); |
| 2711 | w->frozen_window_start_p = 0; | 2711 | w->frozen_window_start_p = 0; |
| @@ -2802,7 +2802,7 @@ See `special-display-buffer-names', and `special-display-regexps'. */) | |||
| 2802 | { | 2802 | { |
| 2803 | Lisp_Object tem; | 2803 | Lisp_Object tem; |
| 2804 | 2804 | ||
| 2805 | CHECK_STRING (buffer_name, 1); | 2805 | CHECK_STRING (buffer_name); |
| 2806 | 2806 | ||
| 2807 | tem = Fmember (buffer_name, Vspecial_display_buffer_names); | 2807 | tem = Fmember (buffer_name, Vspecial_display_buffer_names); |
| 2808 | if (!NILP (tem)) | 2808 | if (!NILP (tem)) |
| @@ -2834,7 +2834,7 @@ See `same-window-buffer-names' and `same-window-regexps'. */) | |||
| 2834 | { | 2834 | { |
| 2835 | Lisp_Object tem; | 2835 | Lisp_Object tem; |
| 2836 | 2836 | ||
| 2837 | CHECK_STRING (buffer_name, 1); | 2837 | CHECK_STRING (buffer_name); |
| 2838 | 2838 | ||
| 2839 | tem = Fmember (buffer_name, Vsame_window_buffer_names); | 2839 | tem = Fmember (buffer_name, Vsame_window_buffer_names); |
| 2840 | if (!NILP (tem)) | 2840 | if (!NILP (tem)) |
| @@ -2895,7 +2895,7 @@ displayed. */) | |||
| 2895 | 2895 | ||
| 2896 | swp = Qnil; | 2896 | swp = Qnil; |
| 2897 | buffer = Fget_buffer (buffer); | 2897 | buffer = Fget_buffer (buffer); |
| 2898 | CHECK_BUFFER (buffer, 0); | 2898 | CHECK_BUFFER (buffer); |
| 2899 | 2899 | ||
| 2900 | if (!NILP (Vdisplay_buffer_function)) | 2900 | if (!NILP (Vdisplay_buffer_function)) |
| 2901 | return call2 (Vdisplay_buffer_function, buffer, not_this_window); | 2901 | return call2 (Vdisplay_buffer_function, buffer, not_this_window); |
| @@ -3165,7 +3165,7 @@ SIZE includes that window's scroll bar, or the divider column to its right. */) | |||
| 3165 | if (NILP (window)) | 3165 | if (NILP (window)) |
| 3166 | window = selected_window; | 3166 | window = selected_window; |
| 3167 | else | 3167 | else |
| 3168 | CHECK_LIVE_WINDOW (window, 0); | 3168 | CHECK_LIVE_WINDOW (window); |
| 3169 | 3169 | ||
| 3170 | o = XWINDOW (window); | 3170 | o = XWINDOW (window); |
| 3171 | fo = XFRAME (WINDOW_FRAME (o)); | 3171 | fo = XFRAME (WINDOW_FRAME (o)); |
| @@ -3183,7 +3183,7 @@ SIZE includes that window's scroll bar, or the divider column to its right. */) | |||
| 3183 | } | 3183 | } |
| 3184 | else | 3184 | else |
| 3185 | { | 3185 | { |
| 3186 | CHECK_NUMBER (size, 1); | 3186 | CHECK_NUMBER (size); |
| 3187 | size_int = XINT (size); | 3187 | size_int = XINT (size); |
| 3188 | } | 3188 | } |
| 3189 | 3189 | ||
| @@ -3278,7 +3278,7 @@ Interactively, if an argument is not given, make the window one line bigger. */ | |||
| 3278 | (arg, side) | 3278 | (arg, side) |
| 3279 | register Lisp_Object arg, side; | 3279 | register Lisp_Object arg, side; |
| 3280 | { | 3280 | { |
| 3281 | CHECK_NUMBER (arg, 0); | 3281 | CHECK_NUMBER (arg); |
| 3282 | enlarge_window (selected_window, XINT (arg), !NILP (side)); | 3282 | enlarge_window (selected_window, XINT (arg), !NILP (side)); |
| 3283 | 3283 | ||
| 3284 | if (! NILP (Vwindow_configuration_change_hook)) | 3284 | if (! NILP (Vwindow_configuration_change_hook)) |
| @@ -3294,7 +3294,7 @@ Interactively, if an argument is not given, make the window one line smaller. * | |||
| 3294 | (arg, side) | 3294 | (arg, side) |
| 3295 | register Lisp_Object arg, side; | 3295 | register Lisp_Object arg, side; |
| 3296 | { | 3296 | { |
| 3297 | CHECK_NUMBER (arg, 0); | 3297 | CHECK_NUMBER (arg); |
| 3298 | enlarge_window (selected_window, -XINT (arg), !NILP (side)); | 3298 | enlarge_window (selected_window, -XINT (arg), !NILP (side)); |
| 3299 | 3299 | ||
| 3300 | if (! NILP (Vwindow_configuration_change_hook)) | 3300 | if (! NILP (Vwindow_configuration_change_hook)) |
| @@ -4349,7 +4349,7 @@ showing that buffer is used. */) | |||
| 4349 | && ! EQ (window, selected_window)); | 4349 | && ! EQ (window, selected_window)); |
| 4350 | } | 4350 | } |
| 4351 | 4351 | ||
| 4352 | CHECK_LIVE_WINDOW (window, 0); | 4352 | CHECK_LIVE_WINDOW (window); |
| 4353 | 4353 | ||
| 4354 | if (EQ (window, selected_window)) | 4354 | if (EQ (window, selected_window)) |
| 4355 | error ("There is no other window"); | 4355 | error ("There is no other window"); |
| @@ -4394,7 +4394,7 @@ showing that buffer, popping the buffer up if necessary. */) | |||
| 4394 | { | 4394 | { |
| 4395 | if (CONSP (arg)) | 4395 | if (CONSP (arg)) |
| 4396 | arg = Fcar (arg); | 4396 | arg = Fcar (arg); |
| 4397 | CHECK_NUMBER (arg, 0); | 4397 | CHECK_NUMBER (arg); |
| 4398 | window_scroll (window, XINT (arg), 0, 1); | 4398 | window_scroll (window, XINT (arg), 0, 1); |
| 4399 | } | 4399 | } |
| 4400 | 4400 | ||
| @@ -4549,7 +4549,7 @@ and redisplay normally--don't erase and redraw the frame. */) | |||
| 4549 | else | 4549 | else |
| 4550 | { | 4550 | { |
| 4551 | arg = Fprefix_numeric_value (arg); | 4551 | arg = Fprefix_numeric_value (arg); |
| 4552 | CHECK_NUMBER (arg, 0); | 4552 | CHECK_NUMBER (arg); |
| 4553 | } | 4553 | } |
| 4554 | 4554 | ||
| 4555 | set_buffer_internal (buf); | 4555 | set_buffer_internal (buf); |
| @@ -5271,7 +5271,7 @@ redirection (see `redirect-frame-focus'). */) | |||
| 5271 | 5271 | ||
| 5272 | if (NILP (frame)) | 5272 | if (NILP (frame)) |
| 5273 | frame = selected_frame; | 5273 | frame = selected_frame; |
| 5274 | CHECK_LIVE_FRAME (frame, 0); | 5274 | CHECK_LIVE_FRAME (frame); |
| 5275 | f = XFRAME (frame); | 5275 | f = XFRAME (frame); |
| 5276 | 5276 | ||
| 5277 | n_windows = count_windows (XWINDOW (FRAME_ROOT_WINDOW (f))); | 5277 | n_windows = count_windows (XWINDOW (FRAME_ROOT_WINDOW (f))); |
| @@ -5340,9 +5340,9 @@ A nil width parameter means no margin. */) | |||
| 5340 | struct window *w = decode_window (window); | 5340 | struct window *w = decode_window (window); |
| 5341 | 5341 | ||
| 5342 | if (!NILP (left)) | 5342 | if (!NILP (left)) |
| 5343 | CHECK_NUMBER_OR_FLOAT (left, 1); | 5343 | CHECK_NUMBER_OR_FLOAT (left); |
| 5344 | if (!NILP (right)) | 5344 | if (!NILP (right)) |
| 5345 | CHECK_NUMBER_OR_FLOAT (right, 2); | 5345 | CHECK_NUMBER_OR_FLOAT (right); |
| 5346 | 5346 | ||
| 5347 | /* Check widths < 0 and translate a zero width to nil. | 5347 | /* Check widths < 0 and translate a zero width to nil. |
| 5348 | Margins that are too wide have to be checked elsewhere. */ | 5348 | Margins that are too wide have to be checked elsewhere. */ |
| @@ -5401,7 +5401,7 @@ Value is a multiple of the canonical character height of WINDOW. */) | |||
| 5401 | if (NILP (window)) | 5401 | if (NILP (window)) |
| 5402 | window = selected_window; | 5402 | window = selected_window; |
| 5403 | else | 5403 | else |
| 5404 | CHECK_WINDOW (window, 0); | 5404 | CHECK_WINDOW (window); |
| 5405 | w = XWINDOW (window); | 5405 | w = XWINDOW (window); |
| 5406 | f = XFRAME (w->frame); | 5406 | f = XFRAME (w->frame); |
| 5407 | 5407 | ||
| @@ -5427,8 +5427,8 @@ non-negative multiple of the canonical character height of WINDOW. */) | |||
| 5427 | if (NILP (window)) | 5427 | if (NILP (window)) |
| 5428 | window = selected_window; | 5428 | window = selected_window; |
| 5429 | else | 5429 | else |
| 5430 | CHECK_WINDOW (window, 0); | 5430 | CHECK_WINDOW (window); |
| 5431 | CHECK_NUMBER_OR_FLOAT (vscroll, 1); | 5431 | CHECK_NUMBER_OR_FLOAT (vscroll); |
| 5432 | 5432 | ||
| 5433 | w = XWINDOW (window); | 5433 | w = XWINDOW (window); |
| 5434 | f = XFRAME (w->frame); | 5434 | f = XFRAME (w->frame); |