Mercurial > hg > xemacs-beta
comparison src/abbrev.c @ 5581:56144c8593a8
Mechanically change INT to FIXNUM in our sources.
src/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
[...]
Mechanically change INT (where it refers to non-bignum Lisp
integers) to FIXNUM in our sources. Done for the following
functions, enums, and macros: Lisp_Type_Int_Even,
Lisp_Type_Int_Odd, INT_GCBITS, INT_VALBITS, make_int(), INTP(),
XINT(), CHECK_INT(), XREALINT(), INT_PLUS(), INT_MINUS(),
EMACS_INT_MAX (to MOST_POSITIVE_FIXNUM), EMACS_INT_MIN (to
MOST_NEGATIVE_FIXNUM), NUMBER_FITS_IN_AN_EMACS_INT() to
NUMBER_FITS_IN_A_FIXNUM(), XFLOATINT, XCHAR_OR_INT, INT_OR_FLOAT.
The EMACS_INT typedef was not changed, it does not describe
non-bignum Lisp integers.
Script that did the change available in
http://mid.gmane.org/20067.17650.181273.12014@parhasard.net .
modules/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
[...]
Mechanically change INT to FIXNUM, where the usage describes non-bignum
Lisp integers. See the src/ChangeLog entry for more details.
man/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
* internals/internals.texi (How Lisp Objects Are Represented in C):
* internals/internals.texi (Integers and Characters):
Mechanically change INT to FIXNUM, where the usage describes non-bignum
Lisp integers.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 09 Oct 2011 09:51:57 +0100 |
parents | 0af042a0c116 |
children | 2014ff433daf |
comparison
equal
deleted
inserted
replaced
5580:a0e81357194e | 5581:56144c8593a8 |
---|---|
368 { | 368 { |
369 /* Abbrev was all caps */ | 369 /* Abbrev was all caps */ |
370 if (!abbrev_all_caps | 370 if (!abbrev_all_caps |
371 && scan_words (buf, point, -1) > scan_words (buf, abbrev_start, 1)) | 371 && scan_words (buf, point, -1) > scan_words (buf, abbrev_start, 1)) |
372 { | 372 { |
373 Fupcase_initials_region (make_int (abbrev_start), make_int (point), | 373 Fupcase_initials_region (make_fixnum (abbrev_start), make_fixnum (point), |
374 wrap_buffer (buf)); | 374 wrap_buffer (buf)); |
375 } | 375 } |
376 else | 376 else |
377 { | 377 { |
378 /* If expansion is one word, or if user says so, upcase it all. */ | 378 /* If expansion is one word, or if user says so, upcase it all. */ |
379 Fupcase_region (make_int (abbrev_start), make_int (point), | 379 Fupcase_region (make_fixnum (abbrev_start), make_fixnum (point), |
380 wrap_buffer (buf)); | 380 wrap_buffer (buf)); |
381 } | 381 } |
382 } | 382 } |
383 else if (uccount) | 383 else if (uccount) |
384 { | 384 { |
388 while (pos < point | 388 while (pos < point |
389 && !WORD_SYNTAX_P (buf->mirror_syntax_table, | 389 && !WORD_SYNTAX_P (buf->mirror_syntax_table, |
390 BUF_FETCH_CHAR (buf, pos))) | 390 BUF_FETCH_CHAR (buf, pos))) |
391 pos++; | 391 pos++; |
392 /* Change just that. */ | 392 /* Change just that. */ |
393 Fupcase_initials_region (make_int (pos), make_int (pos + 1), | 393 Fupcase_initials_region (make_fixnum (pos), make_fixnum (pos + 1), |
394 wrap_buffer (buf)); | 394 wrap_buffer (buf)); |
395 } | 395 } |
396 | 396 |
397 hook = symbol_function (abbrev_symbol); | 397 hook = symbol_function (abbrev_symbol); |
398 if (!NILP (hook) && !UNBOUNDP (hook)) | 398 if (!NILP (hook) && !UNBOUNDP (hook)) |
406 { | 406 { |
407 Lisp_Object name, count, system_flag; | 407 Lisp_Object name, count, system_flag; |
408 /* This function can GC */ | 408 /* This function can GC */ |
409 struct buffer *buf = current_buffer; | 409 struct buffer *buf = current_buffer; |
410 | 410 |
411 if (INTP (XSYMBOL (sym)->plist)) | 411 if (FIXNUMP (XSYMBOL (sym)->plist)) |
412 { | 412 { |
413 count = XSYMBOL (sym)->plist; | 413 count = XSYMBOL (sym)->plist; |
414 system_flag = Qnil; | 414 system_flag = Qnil; |
415 } | 415 } |
416 else | 416 else |
439 { | 439 { |
440 Lisp_Object one, count, system_flag; | 440 Lisp_Object one, count, system_flag; |
441 /* This function can GC */ | 441 /* This function can GC */ |
442 struct buffer *buf = current_buffer; | 442 struct buffer *buf = current_buffer; |
443 | 443 |
444 if (INTP (XSYMBOL (sym)->plist)) | 444 if (FIXNUMP (XSYMBOL (sym)->plist)) |
445 { | 445 { |
446 count = XSYMBOL (sym)->plist; | 446 count = XSYMBOL (sym)->plist; |
447 system_flag = Qnil; | 447 system_flag = Qnil; |
448 } | 448 } |
449 else | 449 else |
453 } | 453 } |
454 | 454 |
455 if (NILP (XSYMBOL_VALUE (sym))) | 455 if (NILP (XSYMBOL_VALUE (sym))) |
456 return; | 456 return; |
457 | 457 |
458 one = make_int (1); | 458 one = make_fixnum (1); |
459 Fprin1 (Fsymbol_name (sym), stream); | 459 Fprin1 (Fsymbol_name (sym), stream); |
460 | 460 |
461 if (!NILP (system_flag)) | 461 if (!NILP (system_flag)) |
462 { | 462 { |
463 buffer_insert_ascstring (buf, " (sys)"); | 463 buffer_insert_ascstring (buf, " (sys)"); |
464 Findent_to (make_int (20), one, Qnil); | 464 Findent_to (make_fixnum (20), one, Qnil); |
465 } | 465 } |
466 else | 466 else |
467 Findent_to (make_int (15), one, Qnil); | 467 Findent_to (make_fixnum (15), one, Qnil); |
468 | 468 |
469 Fprin1 (count, stream); | 469 Fprin1 (count, stream); |
470 Findent_to (make_int (20), one, Qnil); | 470 Findent_to (make_fixnum (20), one, Qnil); |
471 Fprin1 (XSYMBOL_VALUE (sym), stream); | 471 Fprin1 (XSYMBOL_VALUE (sym), stream); |
472 if (!NILP (XSYMBOL (sym)->function)) | 472 if (!NILP (XSYMBOL (sym)->function)) |
473 { | 473 { |
474 Findent_to (make_int (45), one, Qnil); | 474 Findent_to (make_fixnum (45), one, Qnil); |
475 Fprin1 (XSYMBOL (sym)->function, stream); | 475 Fprin1 (XSYMBOL (sym)->function, stream); |
476 } | 476 } |
477 buffer_insert_ascstring (buf, "\n"); | 477 buffer_insert_ascstring (buf, "\n"); |
478 } | 478 } |
479 | 479 |