diff options
| author | Tom Tromey | 2018-07-06 21:56:17 -0600 |
|---|---|---|
| committer | Tom Tromey | 2018-07-12 22:12:27 -0600 |
| commit | 42fe787b0f26c2df682b2797407a669ef8522ccb (patch) | |
| tree | e944fe465e2b65703a8361bc82647faf4f7907f1 /src/cmds.c | |
| parent | 01dbf2a347944497fdcf2ec156f4605020d7ba2a (diff) | |
| download | emacs-42fe787b0f26c2df682b2797407a669ef8522ccb.tar.gz emacs-42fe787b0f26c2df682b2797407a669ef8522ccb.zip | |
Rename integerp->fixnum, etc, in preparation for bignums
* src/json.c, src/keyboard.c, src/keyboard.h, src/keymap.c,
src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c,
src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c,
src/process.c, src/profiler.c, src/search.c, src/sound.c,
src/syntax.c, src/sysdep.c, src/term.c, src/terminal.c,
src/textprop.c, src/undo.c, src/w16select.c, src/w32.c,
src/w32console.c, src/w32cygwinx.c, src/w32fns.c, src/w32font.c,
src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c,
src/w32uniscribe.c, src/widget.c, src/window.c, src/xdisp.c,
src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c,
src/xrdb.c, src/xselect.c, src/xterm.c, src/xwidget.c: Rename
INTEGERP->FIXNUM, make_number->make_fixnum, CHECK_NUMBER->CHECK_FIXNUM,
make_natnum->make_fixed_natum, NUMBERP->FIXED_OR_FLOATP,
NATNUMP->FIXNATP, CHECK_NATNUM->CHECK_FIXNAT.
Diffstat (limited to 'src/cmds.c')
| -rw-r--r-- | src/cmds.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/cmds.c b/src/cmds.c index 96b712ed6d2..857197cf9b1 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -35,9 +35,9 @@ DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0, | |||
| 35 | doc: /* Return buffer position N characters after (before if N negative) point. */) | 35 | doc: /* Return buffer position N characters after (before if N negative) point. */) |
| 36 | (Lisp_Object n) | 36 | (Lisp_Object n) |
| 37 | { | 37 | { |
| 38 | CHECK_NUMBER (n); | 38 | CHECK_FIXNUM (n); |
| 39 | 39 | ||
| 40 | return make_number (PT + XINT (n)); | 40 | return make_fixnum (PT + XINT (n)); |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | /* Add N to point; or subtract N if FORWARD is false. N defaults to 1. | 43 | /* Add N to point; or subtract N if FORWARD is false. N defaults to 1. |
| @@ -56,7 +56,7 @@ move_point (Lisp_Object n, bool forward) | |||
| 56 | if (NILP (n)) | 56 | if (NILP (n)) |
| 57 | XSETFASTINT (n, 1); | 57 | XSETFASTINT (n, 1); |
| 58 | else | 58 | else |
| 59 | CHECK_NUMBER (n); | 59 | CHECK_FIXNUM (n); |
| 60 | 60 | ||
| 61 | new_point = PT + (forward ? XINT (n) : - XINT (n)); | 61 | new_point = PT + (forward ? XINT (n) : - XINT (n)); |
| 62 | 62 | ||
| @@ -127,7 +127,7 @@ go to its beginning. */) | |||
| 127 | count = 1; | 127 | count = 1; |
| 128 | else | 128 | else |
| 129 | { | 129 | { |
| 130 | CHECK_NUMBER (n); | 130 | CHECK_FIXNUM (n); |
| 131 | count = XINT (n); | 131 | count = XINT (n); |
| 132 | } | 132 | } |
| 133 | 133 | ||
| @@ -142,7 +142,7 @@ go to its beginning. */) | |||
| 142 | && (FETCH_BYTE (PT_BYTE - 1) != '\n')))) | 142 | && (FETCH_BYTE (PT_BYTE - 1) != '\n')))) |
| 143 | shortage--; | 143 | shortage--; |
| 144 | 144 | ||
| 145 | return make_number (count <= 0 ? - shortage : shortage); | 145 | return make_fixnum (count <= 0 ? - shortage : shortage); |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | DEFUN ("beginning-of-line", Fbeginning_of_line, Sbeginning_of_line, 0, 1, "^p", | 148 | DEFUN ("beginning-of-line", Fbeginning_of_line, Sbeginning_of_line, 0, 1, "^p", |
| @@ -162,7 +162,7 @@ instead. For instance, `(forward-line 0)' does the same thing as | |||
| 162 | if (NILP (n)) | 162 | if (NILP (n)) |
| 163 | XSETFASTINT (n, 1); | 163 | XSETFASTINT (n, 1); |
| 164 | else | 164 | else |
| 165 | CHECK_NUMBER (n); | 165 | CHECK_FIXNUM (n); |
| 166 | 166 | ||
| 167 | SET_PT (XINT (Fline_beginning_position (n))); | 167 | SET_PT (XINT (Fline_beginning_position (n))); |
| 168 | 168 | ||
| @@ -187,7 +187,7 @@ to t. */) | |||
| 187 | if (NILP (n)) | 187 | if (NILP (n)) |
| 188 | XSETFASTINT (n, 1); | 188 | XSETFASTINT (n, 1); |
| 189 | else | 189 | else |
| 190 | CHECK_NUMBER (n); | 190 | CHECK_FIXNUM (n); |
| 191 | 191 | ||
| 192 | while (1) | 192 | while (1) |
| 193 | { | 193 | { |
| @@ -210,7 +210,7 @@ to t. */) | |||
| 210 | /* If we skipped something intangible | 210 | /* If we skipped something intangible |
| 211 | and now we're not really at eol, | 211 | and now we're not really at eol, |
| 212 | keep going. */ | 212 | keep going. */ |
| 213 | n = make_number (1); | 213 | n = make_fixnum (1); |
| 214 | else | 214 | else |
| 215 | break; | 215 | break; |
| 216 | } | 216 | } |
| @@ -230,7 +230,7 @@ because it respects values of `delete-active-region' and `overwrite-mode'. */) | |||
| 230 | { | 230 | { |
| 231 | EMACS_INT pos; | 231 | EMACS_INT pos; |
| 232 | 232 | ||
| 233 | CHECK_NUMBER (n); | 233 | CHECK_FIXNUM (n); |
| 234 | 234 | ||
| 235 | if (eabs (XINT (n)) < 2) | 235 | if (eabs (XINT (n)) < 2) |
| 236 | call0 (Qundo_auto_amalgamate); | 236 | call0 (Qundo_auto_amalgamate); |
| @@ -274,7 +274,7 @@ a non-nil value for the inserted character. At the end, it runs | |||
| 274 | `post-self-insert-hook'. */) | 274 | `post-self-insert-hook'. */) |
| 275 | (Lisp_Object n) | 275 | (Lisp_Object n) |
| 276 | { | 276 | { |
| 277 | CHECK_NUMBER (n); | 277 | CHECK_FIXNUM (n); |
| 278 | 278 | ||
| 279 | if (XINT (n) < 0) | 279 | if (XINT (n) < 0) |
| 280 | error ("Negative repetition argument %"pI"d", XINT (n)); | 280 | error ("Negative repetition argument %"pI"d", XINT (n)); |
| @@ -360,7 +360,7 @@ internal_self_insert (int c, EMACS_INT n) | |||
| 360 | if (EQ (overwrite, Qoverwrite_mode_binary)) | 360 | if (EQ (overwrite, Qoverwrite_mode_binary)) |
| 361 | chars_to_delete = min (n, PTRDIFF_MAX); | 361 | chars_to_delete = min (n, PTRDIFF_MAX); |
| 362 | else if (c != '\n' && c2 != '\n' | 362 | else if (c != '\n' && c2 != '\n' |
| 363 | && (cwidth = XFASTINT (Fchar_width (make_number (c)))) != 0) | 363 | && (cwidth = XFASTINT (Fchar_width (make_fixnum (c)))) != 0) |
| 364 | { | 364 | { |
| 365 | ptrdiff_t pos = PT; | 365 | ptrdiff_t pos = PT; |
| 366 | ptrdiff_t pos_byte = PT_BYTE; | 366 | ptrdiff_t pos_byte = PT_BYTE; |
| @@ -378,7 +378,7 @@ internal_self_insert (int c, EMACS_INT n) | |||
| 378 | character. In that case, the new point is set after | 378 | character. In that case, the new point is set after |
| 379 | that character. */ | 379 | that character. */ |
| 380 | ptrdiff_t actual_clm | 380 | ptrdiff_t actual_clm |
| 381 | = XFASTINT (Fmove_to_column (make_number (target_clm), Qnil)); | 381 | = XFASTINT (Fmove_to_column (make_fixnum (target_clm), Qnil)); |
| 382 | 382 | ||
| 383 | chars_to_delete = PT - pos; | 383 | chars_to_delete = PT - pos; |
| 384 | 384 | ||
| @@ -439,18 +439,18 @@ internal_self_insert (int c, EMACS_INT n) | |||
| 439 | int mc = ((NILP (BVAR (current_buffer, enable_multibyte_characters)) | 439 | int mc = ((NILP (BVAR (current_buffer, enable_multibyte_characters)) |
| 440 | && SINGLE_BYTE_CHAR_P (c)) | 440 | && SINGLE_BYTE_CHAR_P (c)) |
| 441 | ? UNIBYTE_TO_CHAR (c) : c); | 441 | ? UNIBYTE_TO_CHAR (c) : c); |
| 442 | Lisp_Object string = Fmake_string (make_number (n), make_number (mc), | 442 | Lisp_Object string = Fmake_string (make_fixnum (n), make_fixnum (mc), |
| 443 | Qnil); | 443 | Qnil); |
| 444 | 444 | ||
| 445 | if (spaces_to_insert) | 445 | if (spaces_to_insert) |
| 446 | { | 446 | { |
| 447 | tem = Fmake_string (make_number (spaces_to_insert), | 447 | tem = Fmake_string (make_fixnum (spaces_to_insert), |
| 448 | make_number (' '), Qnil); | 448 | make_fixnum (' '), Qnil); |
| 449 | string = concat2 (string, tem); | 449 | string = concat2 (string, tem); |
| 450 | } | 450 | } |
| 451 | 451 | ||
| 452 | replace_range (PT, PT + chars_to_delete, string, 1, 1, 1, 0); | 452 | replace_range (PT, PT + chars_to_delete, string, 1, 1, 1, 0); |
| 453 | Fforward_char (make_number (n)); | 453 | Fforward_char (make_fixnum (n)); |
| 454 | } | 454 | } |
| 455 | else if (n > 1) | 455 | else if (n > 1) |
| 456 | { | 456 | { |