Mercurial > hg > xemacs-beta
comparison src/macros.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 | 308d34e9f07d |
children |
comparison
equal
deleted
inserted
replaced
5580:a0e81357194e | 5581:56144c8593a8 |
---|---|
79 } | 79 } |
80 else | 80 else |
81 { | 81 { |
82 message ("Appending to kbd macro..."); | 82 message ("Appending to kbd macro..."); |
83 con->kbd_macro_ptr = con->kbd_macro_end; | 83 con->kbd_macro_ptr = con->kbd_macro_end; |
84 Fexecute_kbd_macro (con->last_kbd_macro, make_int (1)); | 84 Fexecute_kbd_macro (con->last_kbd_macro, make_fixnum (1)); |
85 } | 85 } |
86 con->defining_kbd_macro = Qt; | 86 con->defining_kbd_macro = Qt; |
87 | 87 |
88 return Qnil; | 88 return Qnil; |
89 } | 89 } |
109 invalid_operation ("Not defining kbd macro", Qunbound); | 109 invalid_operation ("Not defining kbd macro", Qunbound); |
110 | 110 |
111 if (NILP (arg)) | 111 if (NILP (arg)) |
112 repeat = -1; | 112 repeat = -1; |
113 else | 113 else |
114 repeat = XINT (Fprefix_numeric_value (arg)); | 114 repeat = XFIXNUM (Fprefix_numeric_value (arg)); |
115 | 115 |
116 if (!NILP (con->defining_kbd_macro)) | 116 if (!NILP (con->defining_kbd_macro)) |
117 { | 117 { |
118 int i; | 118 int i; |
119 int size = con->kbd_macro_end; | 119 int size = con->kbd_macro_end; |
135 return Qnil; | 135 return Qnil; |
136 else if (repeat == 0) | 136 else if (repeat == 0) |
137 return Fexecute_kbd_macro (con->last_kbd_macro, Qzero); | 137 return Fexecute_kbd_macro (con->last_kbd_macro, Qzero); |
138 else | 138 else |
139 return Fexecute_kbd_macro (con->last_kbd_macro, | 139 return Fexecute_kbd_macro (con->last_kbd_macro, |
140 make_int (repeat - 1)); | 140 make_fixnum (repeat - 1)); |
141 } | 141 } |
142 | 142 |
143 /* #### Read the comment in modeline.el to see why this ugliness is | 143 /* #### Read the comment in modeline.el to see why this ugliness is |
144 needed. #### Try to avoid it, somehow! */ | 144 needed. #### Try to avoid it, somehow! */ |
145 DEFUN ("zap-last-kbd-macro-event", Fzap_last_kbd_macro_event, 0, 0, 0, /* | 145 DEFUN ("zap-last-kbd-macro-event", Fzap_last_kbd_macro_event, 0, 0, 0, /* |
182 { | 182 { |
183 assert (!NILP (Vexecuting_macro)); | 183 assert (!NILP (Vexecuting_macro)); |
184 | 184 |
185 if (STRINGP (Vexecuting_macro) || VECTORP (Vexecuting_macro)) | 185 if (STRINGP (Vexecuting_macro) || VECTORP (Vexecuting_macro)) |
186 { | 186 { |
187 if (executing_macro_index < XINT (Flength (Vexecuting_macro))) | 187 if (executing_macro_index < XFIXNUM (Flength (Vexecuting_macro))) |
188 { | 188 { |
189 nth_of_key_sequence_as_event (Vexecuting_macro, | 189 nth_of_key_sequence_as_event (Vexecuting_macro, |
190 executing_macro_index++, | 190 executing_macro_index++, |
191 event); | 191 event); |
192 return; | 192 return; |
258 struct console *con = XCONSOLE (Vselected_console); | 258 struct console *con = XCONSOLE (Vselected_console); |
259 | 259 |
260 if (!NILP (count)) | 260 if (!NILP (count)) |
261 { | 261 { |
262 count = Fprefix_numeric_value (count); | 262 count = Fprefix_numeric_value (count); |
263 repeat = XINT (count); | 263 repeat = XFIXNUM (count); |
264 } | 264 } |
265 | 265 |
266 final = indirect_function (macro, 1); | 266 final = indirect_function (macro, 1); |
267 if (!STRINGP (final) && !VECTORP (final)) | 267 if (!STRINGP (final) && !VECTORP (final)) |
268 invalid_argument ("Keyboard macros must be strings or vectors", Qunbound); | 268 invalid_argument ("Keyboard macros must be strings or vectors", Qunbound); |