aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.c
diff options
context:
space:
mode:
authorTom Tromey2018-07-06 21:56:17 -0600
committerTom Tromey2018-07-12 22:12:27 -0600
commit42fe787b0f26c2df682b2797407a669ef8522ccb (patch)
treee944fe465e2b65703a8361bc82647faf4f7907f1 /src/keymap.c
parent01dbf2a347944497fdcf2ec156f4605020d7ba2a (diff)
downloademacs-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/keymap.c')
-rw-r--r--src/keymap.c134
1 files changed, 67 insertions, 67 deletions
diff --git a/src/keymap.c b/src/keymap.c
index fcee788e6f9..a7e0557ebde 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -159,7 +159,7 @@ in case you use it as a menu with `x-popup-menu'. */)
159void 159void
160initial_define_key (Lisp_Object keymap, int key, const char *defname) 160initial_define_key (Lisp_Object keymap, int key, const char *defname)
161{ 161{
162 store_in_keymap (keymap, make_number (key), intern_c_string (defname)); 162 store_in_keymap (keymap, make_fixnum (key), intern_c_string (defname));
163} 163}
164 164
165void 165void
@@ -248,7 +248,7 @@ get_keymap (Lisp_Object object, bool error_if_not_keymap, bool autoload)
248 { 248 {
249 Lisp_Object tail; 249 Lisp_Object tail;
250 250
251 tail = Fnth (make_number (4), tem); 251 tail = Fnth (make_fixnum (4), tem);
252 if (EQ (tail, Qkeymap)) 252 if (EQ (tail, Qkeymap))
253 { 253 {
254 if (autoload) 254 if (autoload)
@@ -379,13 +379,13 @@ access_keymap_1 (Lisp_Object map, Lisp_Object idx,
379 be put in the canonical order. */ 379 be put in the canonical order. */
380 if (SYMBOLP (idx)) 380 if (SYMBOLP (idx))
381 idx = reorder_modifiers (idx); 381 idx = reorder_modifiers (idx);
382 else if (INTEGERP (idx)) 382 else if (FIXNUMP (idx))
383 /* Clobber the high bits that can be present on a machine 383 /* Clobber the high bits that can be present on a machine
384 with more than 24 bits of integer. */ 384 with more than 24 bits of integer. */
385 XSETFASTINT (idx, XINT (idx) & (CHAR_META | (CHAR_META - 1))); 385 XSETFASTINT (idx, XINT (idx) & (CHAR_META | (CHAR_META - 1)));
386 386
387 /* Handle the special meta -> esc mapping. */ 387 /* Handle the special meta -> esc mapping. */
388 if (INTEGERP (idx) && XFASTINT (idx) & meta_modifier) 388 if (FIXNUMP (idx) && XFASTINT (idx) & meta_modifier)
389 { 389 {
390 /* See if there is a meta-map. If there's none, there is 390 /* See if there is a meta-map. If there's none, there is
391 no binding for IDX, unless a default binding exists in MAP. */ 391 no binding for IDX, unless a default binding exists in MAP. */
@@ -393,14 +393,14 @@ access_keymap_1 (Lisp_Object map, Lisp_Object idx,
393 /* A strange value in which Meta is set would cause 393 /* A strange value in which Meta is set would cause
394 infinite recursion. Protect against that. */ 394 infinite recursion. Protect against that. */
395 if (XINT (meta_prefix_char) & CHAR_META) 395 if (XINT (meta_prefix_char) & CHAR_META)
396 meta_prefix_char = make_number (27); 396 meta_prefix_char = make_fixnum (27);
397 event_meta_binding = access_keymap_1 (map, meta_prefix_char, t_ok, 397 event_meta_binding = access_keymap_1 (map, meta_prefix_char, t_ok,
398 noinherit, autoload); 398 noinherit, autoload);
399 event_meta_map = get_keymap (event_meta_binding, 0, autoload); 399 event_meta_map = get_keymap (event_meta_binding, 0, autoload);
400 if (CONSP (event_meta_map)) 400 if (CONSP (event_meta_map))
401 { 401 {
402 map = event_meta_map; 402 map = event_meta_map;
403 idx = make_number (XFASTINT (idx) & ~meta_modifier); 403 idx = make_fixnum (XFASTINT (idx) & ~meta_modifier);
404 } 404 }
405 else if (t_ok) 405 else if (t_ok)
406 /* Set IDX to t, so that we only find a default binding. */ 406 /* Set IDX to t, so that we only find a default binding. */
@@ -473,7 +473,7 @@ access_keymap_1 (Lisp_Object map, Lisp_Object idx,
473 } 473 }
474 else if (VECTORP (binding)) 474 else if (VECTORP (binding))
475 { 475 {
476 if (INTEGERP (idx) && XFASTINT (idx) < ASIZE (binding)) 476 if (FIXNUMP (idx) && XFASTINT (idx) < ASIZE (binding))
477 val = AREF (binding, XFASTINT (idx)); 477 val = AREF (binding, XFASTINT (idx));
478 } 478 }
479 else if (CHAR_TABLE_P (binding)) 479 else if (CHAR_TABLE_P (binding))
@@ -481,7 +481,7 @@ access_keymap_1 (Lisp_Object map, Lisp_Object idx,
481 /* Character codes with modifiers 481 /* Character codes with modifiers
482 are not included in a char-table. 482 are not included in a char-table.
483 All character codes without modifiers are included. */ 483 All character codes without modifiers are included. */
484 if (INTEGERP (idx) && (XFASTINT (idx) & CHAR_MODIFIER_MASK) == 0) 484 if (FIXNUMP (idx) && (XFASTINT (idx) & CHAR_MODIFIER_MASK) == 0)
485 { 485 {
486 val = Faref (binding, idx); 486 val = Faref (binding, idx);
487 /* nil has a special meaning for char-tables, so 487 /* nil has a special meaning for char-tables, so
@@ -782,7 +782,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def)
782 be put in the canonical order. */ 782 be put in the canonical order. */
783 if (SYMBOLP (idx)) 783 if (SYMBOLP (idx))
784 idx = reorder_modifiers (idx); 784 idx = reorder_modifiers (idx);
785 else if (INTEGERP (idx)) 785 else if (FIXNUMP (idx))
786 /* Clobber the high bits that can be present on a machine 786 /* Clobber the high bits that can be present on a machine
787 with more than 24 bits of integer. */ 787 with more than 24 bits of integer. */
788 XSETFASTINT (idx, XINT (idx) & (CHAR_META | (CHAR_META - 1))); 788 XSETFASTINT (idx, XINT (idx) & (CHAR_META | (CHAR_META - 1)));
@@ -807,7 +807,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def)
807 elt = XCAR (tail); 807 elt = XCAR (tail);
808 if (VECTORP (elt)) 808 if (VECTORP (elt))
809 { 809 {
810 if (NATNUMP (idx) && XFASTINT (idx) < ASIZE (elt)) 810 if (FIXNATP (idx) && XFASTINT (idx) < ASIZE (elt))
811 { 811 {
812 CHECK_IMPURE (elt, XVECTOR (elt)); 812 CHECK_IMPURE (elt, XVECTOR (elt));
813 ASET (elt, XFASTINT (idx), def); 813 ASET (elt, XFASTINT (idx), def);
@@ -833,7 +833,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def)
833 /* Character codes with modifiers 833 /* Character codes with modifiers
834 are not included in a char-table. 834 are not included in a char-table.
835 All character codes without modifiers are included. */ 835 All character codes without modifiers are included. */
836 if (NATNUMP (idx) && !(XFASTINT (idx) & CHAR_MODIFIER_MASK)) 836 if (FIXNATP (idx) && !(XFASTINT (idx) & CHAR_MODIFIER_MASK))
837 { 837 {
838 Faset (elt, idx, 838 Faset (elt, idx,
839 /* nil has a special meaning for char-tables, so 839 /* nil has a special meaning for char-tables, so
@@ -1093,7 +1093,7 @@ binding KEY to DEF is added at the front of KEYMAP. */)
1093 1093
1094 if (VECTORP (def) && ASIZE (def) > 0 && CONSP (AREF (def, 0))) 1094 if (VECTORP (def) && ASIZE (def) > 0 && CONSP (AREF (def, 0)))
1095 { /* DEF is apparently an XEmacs-style keyboard macro. */ 1095 { /* DEF is apparently an XEmacs-style keyboard macro. */
1096 Lisp_Object tmp = Fmake_vector (make_number (ASIZE (def)), Qnil); 1096 Lisp_Object tmp = Fmake_vector (make_fixnum (ASIZE (def)), Qnil);
1097 ptrdiff_t i = ASIZE (def); 1097 ptrdiff_t i = ASIZE (def);
1098 while (--i >= 0) 1098 while (--i >= 0)
1099 { 1099 {
@@ -1108,7 +1108,7 @@ binding KEY to DEF is added at the front of KEYMAP. */)
1108 idx = 0; 1108 idx = 0;
1109 while (1) 1109 while (1)
1110 { 1110 {
1111 c = Faref (key, make_number (idx)); 1111 c = Faref (key, make_fixnum (idx));
1112 1112
1113 if (CONSP (c)) 1113 if (CONSP (c))
1114 { 1114 {
@@ -1123,7 +1123,7 @@ binding KEY to DEF is added at the front of KEYMAP. */)
1123 if (SYMBOLP (c)) 1123 if (SYMBOLP (c))
1124 silly_event_symbol_error (c); 1124 silly_event_symbol_error (c);
1125 1125
1126 if (INTEGERP (c) 1126 if (FIXNUMP (c)
1127 && (XINT (c) & meta_bit) 1127 && (XINT (c) & meta_bit)
1128 && !metized) 1128 && !metized)
1129 { 1129 {
@@ -1132,17 +1132,17 @@ binding KEY to DEF is added at the front of KEYMAP. */)
1132 } 1132 }
1133 else 1133 else
1134 { 1134 {
1135 if (INTEGERP (c)) 1135 if (FIXNUMP (c))
1136 XSETINT (c, XINT (c) & ~meta_bit); 1136 XSETINT (c, XINT (c) & ~meta_bit);
1137 1137
1138 metized = 0; 1138 metized = 0;
1139 idx++; 1139 idx++;
1140 } 1140 }
1141 1141
1142 if (!INTEGERP (c) && !SYMBOLP (c) 1142 if (!FIXNUMP (c) && !SYMBOLP (c)
1143 && (!CONSP (c) 1143 && (!CONSP (c)
1144 /* If C is a range, it must be a leaf. */ 1144 /* If C is a range, it must be a leaf. */
1145 || (INTEGERP (XCAR (c)) && idx != length))) 1145 || (FIXNUMP (XCAR (c)) && idx != length)))
1146 message_with_string ("Key sequence contains invalid event %s", c, 1); 1146 message_with_string ("Key sequence contains invalid event %s", c, 1);
1147 1147
1148 if (idx == length) 1148 if (idx == length)
@@ -1165,8 +1165,8 @@ binding KEY to DEF is added at the front of KEYMAP. */)
1165 error; key might be a vector, not a string. */ 1165 error; key might be a vector, not a string. */
1166 error ("Key sequence %s starts with non-prefix key %s%s", 1166 error ("Key sequence %s starts with non-prefix key %s%s",
1167 SDATA (Fkey_description (key, Qnil)), 1167 SDATA (Fkey_description (key, Qnil)),
1168 SDATA (Fkey_description (Fsubstring (key, make_number (0), 1168 SDATA (Fkey_description (Fsubstring (key, make_fixnum (0),
1169 make_number (idx)), 1169 make_fixnum (idx)),
1170 Qnil)), 1170 Qnil)),
1171 trailing_esc); 1171 trailing_esc);
1172 } 1172 }
@@ -1201,7 +1201,7 @@ remapping in all currently active keymaps. */)
1201 else 1201 else
1202 command = Flookup_key (Fcons (Qkeymap, keymaps), 1202 command = Flookup_key (Fcons (Qkeymap, keymaps),
1203 command_remapping_vector, Qnil); 1203 command_remapping_vector, Qnil);
1204 return INTEGERP (command) ? Qnil : command; 1204 return FIXNUMP (command) ? Qnil : command;
1205} 1205}
1206 1206
1207/* Value is number if KEY is too long; nil if valid but has no definition. */ 1207/* Value is number if KEY is too long; nil if valid but has no definition. */
@@ -1240,7 +1240,7 @@ recognize the default bindings, just as `read-key-sequence' does. */)
1240 idx = 0; 1240 idx = 0;
1241 while (1) 1241 while (1)
1242 { 1242 {
1243 c = Faref (key, make_number (idx++)); 1243 c = Faref (key, make_fixnum (idx++));
1244 1244
1245 if (CONSP (c) && lucid_event_type_list_p (c)) 1245 if (CONSP (c) && lucid_event_type_list_p (c))
1246 c = Fevent_convert_list (c); 1246 c = Fevent_convert_list (c);
@@ -1251,7 +1251,7 @@ recognize the default bindings, just as `read-key-sequence' does. */)
1251 1251
1252 /* Allow string since binding for `menu-bar-select-buffer' 1252 /* Allow string since binding for `menu-bar-select-buffer'
1253 includes the buffer name in the key sequence. */ 1253 includes the buffer name in the key sequence. */
1254 if (!INTEGERP (c) && !SYMBOLP (c) && !CONSP (c) && !STRINGP (c)) 1254 if (!FIXNUMP (c) && !SYMBOLP (c) && !CONSP (c) && !STRINGP (c))
1255 message_with_string ("Key sequence contains invalid event %s", c, 1); 1255 message_with_string ("Key sequence contains invalid event %s", c, 1);
1256 1256
1257 cmd = access_keymap (keymap, c, t_ok, 0, 1); 1257 cmd = access_keymap (keymap, c, t_ok, 0, 1);
@@ -1260,7 +1260,7 @@ recognize the default bindings, just as `read-key-sequence' does. */)
1260 1260
1261 keymap = get_keymap (cmd, 0, 1); 1261 keymap = get_keymap (cmd, 0, 1);
1262 if (!CONSP (keymap)) 1262 if (!CONSP (keymap))
1263 return make_number (idx); 1263 return make_fixnum (idx);
1264 1264
1265 maybe_quit (); 1265 maybe_quit ();
1266 } 1266 }
@@ -1474,7 +1474,7 @@ current_minor_maps (Lisp_Object **modeptr, Lisp_Object **mapptr)
1474static ptrdiff_t 1474static ptrdiff_t
1475click_position (Lisp_Object position) 1475click_position (Lisp_Object position)
1476{ 1476{
1477 EMACS_INT pos = (INTEGERP (position) ? XINT (position) 1477 EMACS_INT pos = (FIXNUMP (position) ? XINT (position)
1478 : MARKERP (position) ? marker_position (position) 1478 : MARKERP (position) ? marker_position (position)
1479 : PT); 1479 : PT);
1480 if (! (BEGV <= pos && pos <= ZV)) 1480 if (! (BEGV <= pos && pos <= ZV))
@@ -1552,7 +1552,7 @@ like in the respective argument of `key-binding'. */)
1552 Lisp_Object pos; 1552 Lisp_Object pos;
1553 1553
1554 pos = POSN_BUFFER_POSN (position); 1554 pos = POSN_BUFFER_POSN (position);
1555 if (INTEGERP (pos) 1555 if (FIXNUMP (pos)
1556 && XINT (pos) >= BEG && XINT (pos) <= Z) 1556 && XINT (pos) >= BEG && XINT (pos) <= Z)
1557 { 1557 {
1558 local_map = get_local_map (XINT (pos), 1558 local_map = get_local_map (XINT (pos),
@@ -1575,7 +1575,7 @@ like in the respective argument of `key-binding'. */)
1575 1575
1576 pos = XCDR (string); 1576 pos = XCDR (string);
1577 string = XCAR (string); 1577 string = XCAR (string);
1578 if (INTEGERP (pos) 1578 if (FIXNUMP (pos)
1579 && XINT (pos) >= 0 1579 && XINT (pos) >= 0
1580 && XINT (pos) < SCHARS (string)) 1580 && XINT (pos) < SCHARS (string))
1581 { 1581 {
@@ -1667,7 +1667,7 @@ specified buffer position instead of point are used.
1667 value = Flookup_key (Fcons (Qkeymap, Fcurrent_active_maps (Qt, position)), 1667 value = Flookup_key (Fcons (Qkeymap, Fcurrent_active_maps (Qt, position)),
1668 key, accept_default); 1668 key, accept_default);
1669 1669
1670 if (NILP (value) || INTEGERP (value)) 1670 if (NILP (value) || FIXNUMP (value))
1671 return Qnil; 1671 return Qnil;
1672 1672
1673 /* If the result of the ordinary keymap lookup is an interactive 1673 /* If the result of the ordinary keymap lookup is an interactive
@@ -1745,7 +1745,7 @@ bindings; see the description of `lookup-key' for more details about this. */)
1745 for (i = j = 0; i < nmaps; i++) 1745 for (i = j = 0; i < nmaps; i++)
1746 if (!NILP (maps[i]) 1746 if (!NILP (maps[i])
1747 && !NILP (binding = Flookup_key (maps[i], key, accept_default)) 1747 && !NILP (binding = Flookup_key (maps[i], key, accept_default))
1748 && !INTEGERP (binding)) 1748 && !FIXNUMP (binding))
1749 { 1749 {
1750 if (KEYMAPP (binding)) 1750 if (KEYMAPP (binding))
1751 maps[j++] = Fcons (modes[i], binding); 1751 maps[j++] = Fcons (modes[i], binding);
@@ -1843,7 +1843,7 @@ accessible_keymaps_1 (Lisp_Object key, Lisp_Object cmd, Lisp_Object args, void *
1843 Lisp_Object maps = d->maps; 1843 Lisp_Object maps = d->maps;
1844 Lisp_Object tail = d->tail; 1844 Lisp_Object tail = d->tail;
1845 Lisp_Object thisseq = d->thisseq; 1845 Lisp_Object thisseq = d->thisseq;
1846 bool is_metized = d->is_metized && INTEGERP (key); 1846 bool is_metized = d->is_metized && FIXNUMP (key);
1847 Lisp_Object tem; 1847 Lisp_Object tem;
1848 1848
1849 cmd = get_keymap (get_keyelt (cmd, 0), 0, 0); 1849 cmd = get_keymap (get_keyelt (cmd, 0), 0, 0);
@@ -1858,8 +1858,8 @@ accessible_keymaps_1 (Lisp_Object key, Lisp_Object cmd, Lisp_Object args, void *
1858 if (lim <= XINT (Flength (thisseq))) 1858 if (lim <= XINT (Flength (thisseq)))
1859 { /* This keymap was already seen with a smaller prefix. */ 1859 { /* This keymap was already seen with a smaller prefix. */
1860 ptrdiff_t i = 0; 1860 ptrdiff_t i = 0;
1861 while (i < lim && EQ (Faref (prefix, make_number (i)), 1861 while (i < lim && EQ (Faref (prefix, make_fixnum (i)),
1862 Faref (thisseq, make_number (i)))) 1862 Faref (thisseq, make_fixnum (i))))
1863 i++; 1863 i++;
1864 if (i >= lim) 1864 if (i >= lim)
1865 /* `prefix' is a prefix of `thisseq' => there's a cycle. */ 1865 /* `prefix' is a prefix of `thisseq' => there's a cycle. */
@@ -1879,10 +1879,10 @@ accessible_keymaps_1 (Lisp_Object key, Lisp_Object cmd, Lisp_Object args, void *
1879 if (is_metized) 1879 if (is_metized)
1880 { 1880 {
1881 int meta_bit = meta_modifier; 1881 int meta_bit = meta_modifier;
1882 Lisp_Object last = make_number (XINT (Flength (thisseq)) - 1); 1882 Lisp_Object last = make_fixnum (XINT (Flength (thisseq)) - 1);
1883 tem = Fcopy_sequence (thisseq); 1883 tem = Fcopy_sequence (thisseq);
1884 1884
1885 Faset (tem, last, make_number (XINT (key) | meta_bit)); 1885 Faset (tem, last, make_fixnum (XINT (key) | meta_bit));
1886 1886
1887 /* This new sequence is the same length as 1887 /* This new sequence is the same length as
1888 thisseq, so stick it in the list right 1888 thisseq, so stick it in the list right
@@ -1933,7 +1933,7 @@ then the value includes only maps for prefixes that start with PREFIX. */)
1933 int i, i_byte, c; 1933 int i, i_byte, c;
1934 Lisp_Object copy; 1934 Lisp_Object copy;
1935 1935
1936 copy = Fmake_vector (make_number (SCHARS (prefix)), Qnil); 1936 copy = Fmake_vector (make_fixnum (SCHARS (prefix)), Qnil);
1937 for (i = 0, i_byte = 0; i < SCHARS (prefix);) 1937 for (i = 0, i_byte = 0; i < SCHARS (prefix);)
1938 { 1938 {
1939 int i_before = i; 1939 int i_before = i;
@@ -1941,7 +1941,7 @@ then the value includes only maps for prefixes that start with PREFIX. */)
1941 FETCH_STRING_CHAR_ADVANCE (c, prefix, i, i_byte); 1941 FETCH_STRING_CHAR_ADVANCE (c, prefix, i, i_byte);
1942 if (SINGLE_BYTE_CHAR_P (c) && (c & 0200)) 1942 if (SINGLE_BYTE_CHAR_P (c) && (c & 0200))
1943 c ^= 0200 | meta_modifier; 1943 c ^= 0200 | meta_modifier;
1944 ASET (copy, i_before, make_number (c)); 1944 ASET (copy, i_before, make_fixnum (c));
1945 } 1945 }
1946 prefix = copy; 1946 prefix = copy;
1947 } 1947 }
@@ -1969,7 +1969,7 @@ then the value includes only maps for prefixes that start with PREFIX. */)
1969 data.thisseq = Fcar (XCAR (tail)); 1969 data.thisseq = Fcar (XCAR (tail));
1970 data.maps = maps; 1970 data.maps = maps;
1971 data.tail = tail; 1971 data.tail = tail;
1972 last = make_number (XINT (Flength (data.thisseq)) - 1); 1972 last = make_fixnum (XINT (Flength (data.thisseq)) - 1);
1973 /* Does the current sequence end in the meta-prefix-char? */ 1973 /* Does the current sequence end in the meta-prefix-char? */
1974 data.is_metized = (XINT (last) >= 0 1974 data.is_metized = (XINT (last) >= 0
1975 /* Don't metize the last char of PREFIX. */ 1975 /* Don't metize the last char of PREFIX. */
@@ -2072,7 +2072,7 @@ For an approximate inverse of this, see `kbd'. */)
2072 2072
2073 if (add_meta) 2073 if (add_meta)
2074 { 2074 {
2075 if (!INTEGERP (key) 2075 if (!FIXNUMP (key)
2076 || EQ (key, meta_prefix_char) 2076 || EQ (key, meta_prefix_char)
2077 || (XINT (key) & meta_modifier)) 2077 || (XINT (key) & meta_modifier))
2078 { 2078 {
@@ -2108,7 +2108,7 @@ push_key_description (EMACS_INT ch, char *p)
2108 c2 = c & ~(alt_modifier | ctrl_modifier | hyper_modifier 2108 c2 = c & ~(alt_modifier | ctrl_modifier | hyper_modifier
2109 | meta_modifier | shift_modifier | super_modifier); 2109 | meta_modifier | shift_modifier | super_modifier);
2110 2110
2111 if (! CHARACTERP (make_number (c2))) 2111 if (! CHARACTERP (make_fixnum (c2)))
2112 { 2112 {
2113 /* KEY_DESCRIPTION_SIZE is large enough for this. */ 2113 /* KEY_DESCRIPTION_SIZE is large enough for this. */
2114 p += sprintf (p, "[%d]", c); 2114 p += sprintf (p, "[%d]", c);
@@ -2226,7 +2226,7 @@ around function keys and event symbols. */)
2226 if (CONSP (key) && lucid_event_type_list_p (key)) 2226 if (CONSP (key) && lucid_event_type_list_p (key))
2227 key = Fevent_convert_list (key); 2227 key = Fevent_convert_list (key);
2228 2228
2229 if (CONSP (key) && INTEGERP (XCAR (key)) && INTEGERP (XCDR (key))) 2229 if (CONSP (key) && FIXNUMP (XCAR (key)) && FIXNUMP (XCDR (key)))
2230 /* An interval from a map-char-table. */ 2230 /* An interval from a map-char-table. */
2231 { 2231 {
2232 AUTO_STRING (dot_dot, ".."); 2232 AUTO_STRING (dot_dot, "..");
@@ -2237,7 +2237,7 @@ around function keys and event symbols. */)
2237 2237
2238 key = EVENT_HEAD (key); 2238 key = EVENT_HEAD (key);
2239 2239
2240 if (INTEGERP (key)) /* Normal character. */ 2240 if (FIXNUMP (key)) /* Normal character. */
2241 { 2241 {
2242 char tem[KEY_DESCRIPTION_SIZE]; 2242 char tem[KEY_DESCRIPTION_SIZE];
2243 char *p = push_key_description (XINT (key), tem); 2243 char *p = push_key_description (XINT (key), tem);
@@ -2338,7 +2338,7 @@ preferred_sequence_p (Lisp_Object seq)
2338 XSETFASTINT (ii, i); 2338 XSETFASTINT (ii, i);
2339 elt = Faref (seq, ii); 2339 elt = Faref (seq, ii);
2340 2340
2341 if (!INTEGERP (elt)) 2341 if (!FIXNUMP (elt))
2342 return 0; 2342 return 0;
2343 else 2343 else
2344 { 2344 {
@@ -2373,10 +2373,10 @@ shadow_lookup (Lisp_Object shadow, Lisp_Object key, Lisp_Object flag,
2373 for (tail = shadow; CONSP (tail); tail = XCDR (tail)) 2373 for (tail = shadow; CONSP (tail); tail = XCDR (tail))
2374 { 2374 {
2375 value = Flookup_key (XCAR (tail), key, flag); 2375 value = Flookup_key (XCAR (tail), key, flag);
2376 if (NATNUMP (value)) 2376 if (FIXNATP (value))
2377 { 2377 {
2378 value = Flookup_key (XCAR (tail), 2378 value = Flookup_key (XCAR (tail),
2379 Fsubstring (key, make_number (0), value), flag); 2379 Fsubstring (key, make_fixnum (0), value), flag);
2380 if (!NILP (value)) 2380 if (!NILP (value))
2381 return Qnil; 2381 return Qnil;
2382 } 2382 }
@@ -2463,13 +2463,13 @@ where_is_internal (Lisp_Object definition, Lisp_Object keymaps,
2463 2463
2464 this = Fcar (XCAR (maps)); 2464 this = Fcar (XCAR (maps));
2465 map = Fcdr (XCAR (maps)); 2465 map = Fcdr (XCAR (maps));
2466 last = make_number (XINT (Flength (this)) - 1); 2466 last = make_fixnum (XINT (Flength (this)) - 1);
2467 last_is_meta = (XINT (last) >= 0 2467 last_is_meta = (XINT (last) >= 0
2468 && EQ (Faref (this, last), meta_prefix_char)); 2468 && EQ (Faref (this, last), meta_prefix_char));
2469 2469
2470 /* if (nomenus && !preferred_sequence_p (this)) */ 2470 /* if (nomenus && !preferred_sequence_p (this)) */
2471 if (nomenus && XINT (last) >= 0 2471 if (nomenus && XINT (last) >= 0
2472 && SYMBOLP (tem = Faref (this, make_number (0))) 2472 && SYMBOLP (tem = Faref (this, make_fixnum (0)))
2473 && !NILP (Fmemq (XCAR (parse_modifiers (tem)), Vmouse_events))) 2473 && !NILP (Fmemq (XCAR (parse_modifiers (tem)), Vmouse_events)))
2474 /* If no menu entries should be returned, skip over the 2474 /* If no menu entries should be returned, skip over the
2475 keymaps bound to `menu-bar' and `tool-bar' and other 2475 keymaps bound to `menu-bar' and `tool-bar' and other
@@ -2646,9 +2646,9 @@ The optional 5th arg NO-REMAP alters how command remapping is handled:
2646 if (! NILP (sequence)) 2646 if (! NILP (sequence))
2647 { 2647 {
2648 Lisp_Object tem1; 2648 Lisp_Object tem1;
2649 tem1 = Faref (sequence, make_number (ASIZE (sequence) - 1)); 2649 tem1 = Faref (sequence, make_fixnum (ASIZE (sequence) - 1));
2650 if (STRINGP (tem1)) 2650 if (STRINGP (tem1))
2651 Faset (sequence, make_number (ASIZE (sequence) - 1), 2651 Faset (sequence, make_fixnum (ASIZE (sequence) - 1),
2652 build_string ("(any string)")); 2652 build_string ("(any string)"));
2653 } 2653 }
2654 2654
@@ -2717,10 +2717,10 @@ where_is_internal_1 (Lisp_Object key, Lisp_Object binding, Lisp_Object args, voi
2717 return; 2717 return;
2718 2718
2719 /* We have found a match. Construct the key sequence where we found it. */ 2719 /* We have found a match. Construct the key sequence where we found it. */
2720 if (INTEGERP (key) && last_is_meta) 2720 if (FIXNUMP (key) && last_is_meta)
2721 { 2721 {
2722 sequence = Fcopy_sequence (this); 2722 sequence = Fcopy_sequence (this);
2723 Faset (sequence, last, make_number (XINT (key) | meta_modifier)); 2723 Faset (sequence, last, make_fixnum (XINT (key) | meta_modifier));
2724 } 2724 }
2725 else 2725 else
2726 { 2726 {
@@ -2786,7 +2786,7 @@ You type Translation\n\
2786 2786
2787 bufend = push_key_description (translate[c], buf); 2787 bufend = push_key_description (translate[c], buf);
2788 insert (buf, bufend - buf); 2788 insert (buf, bufend - buf);
2789 Findent_to (make_number (16), make_number (1)); 2789 Findent_to (make_fixnum (16), make_fixnum (1));
2790 bufend = push_key_description (c, buf); 2790 bufend = push_key_description (c, buf);
2791 insert (buf, bufend - buf); 2791 insert (buf, bufend - buf);
2792 2792
@@ -2962,7 +2962,7 @@ key binding\n\
2962 elt_prefix = Fcar (elt); 2962 elt_prefix = Fcar (elt);
2963 if (ASIZE (elt_prefix) >= 1) 2963 if (ASIZE (elt_prefix) >= 1)
2964 { 2964 {
2965 tem = Faref (elt_prefix, make_number (0)); 2965 tem = Faref (elt_prefix, make_fixnum (0));
2966 if (EQ (tem, Qmenu_bar)) 2966 if (EQ (tem, Qmenu_bar))
2967 maps = Fdelq (elt, maps); 2967 maps = Fdelq (elt, maps);
2968 } 2968 }
@@ -3011,7 +3011,7 @@ key binding\n\
3011 else 3011 else
3012 { 3012 {
3013 shmap = Flookup_key (shmap, Fcar (elt), Qt); 3013 shmap = Flookup_key (shmap, Fcar (elt), Qt);
3014 if (INTEGERP (shmap)) 3014 if (FIXNUMP (shmap))
3015 shmap = Qnil; 3015 shmap = Qnil;
3016 } 3016 }
3017 3017
@@ -3066,7 +3066,7 @@ describe_command (Lisp_Object definition, Lisp_Object args)
3066 else 3066 else
3067 description_column = 16; 3067 description_column = 16;
3068 3068
3069 Findent_to (make_number (description_column), make_number (1)); 3069 Findent_to (make_fixnum (description_column), make_fixnum (1));
3070 previous_description_column = description_column; 3070 previous_description_column = description_column;
3071 3071
3072 if (SYMBOLP (definition)) 3072 if (SYMBOLP (definition))
@@ -3088,7 +3088,7 @@ describe_translation (Lisp_Object definition, Lisp_Object args)
3088{ 3088{
3089 register Lisp_Object tem1; 3089 register Lisp_Object tem1;
3090 3090
3091 Findent_to (make_number (16), make_number (1)); 3091 Findent_to (make_fixnum (16), make_fixnum (1));
3092 3092
3093 if (SYMBOLP (definition)) 3093 if (SYMBOLP (definition))
3094 { 3094 {
@@ -3125,12 +3125,12 @@ static int
3125describe_map_compare (const void *aa, const void *bb) 3125describe_map_compare (const void *aa, const void *bb)
3126{ 3126{
3127 const struct describe_map_elt *a = aa, *b = bb; 3127 const struct describe_map_elt *a = aa, *b = bb;
3128 if (INTEGERP (a->event) && INTEGERP (b->event)) 3128 if (FIXNUMP (a->event) && FIXNUMP (b->event))
3129 return ((XINT (a->event) > XINT (b->event)) 3129 return ((XINT (a->event) > XINT (b->event))
3130 - (XINT (a->event) < XINT (b->event))); 3130 - (XINT (a->event) < XINT (b->event)));
3131 if (!INTEGERP (a->event) && INTEGERP (b->event)) 3131 if (!FIXNUMP (a->event) && FIXNUMP (b->event))
3132 return 1; 3132 return 1;
3133 if (INTEGERP (a->event) && !INTEGERP (b->event)) 3133 if (FIXNUMP (a->event) && !FIXNUMP (b->event))
3134 return -1; 3134 return -1;
3135 if (SYMBOLP (a->event) && SYMBOLP (b->event)) 3135 if (SYMBOLP (a->event) && SYMBOLP (b->event))
3136 return (!NILP (Fstring_lessp (a->event, b->event)) ? -1 3136 return (!NILP (Fstring_lessp (a->event, b->event)) ? -1
@@ -3170,7 +3170,7 @@ describe_map (Lisp_Object map, Lisp_Object prefix,
3170 /* This vector gets used to present single keys to Flookup_key. Since 3170 /* This vector gets used to present single keys to Flookup_key. Since
3171 that is done once per keymap element, we don't want to cons up a 3171 that is done once per keymap element, we don't want to cons up a
3172 fresh vector every time. */ 3172 fresh vector every time. */
3173 kludge = Fmake_vector (make_number (1), Qnil); 3173 kludge = Fmake_vector (make_fixnum (1), Qnil);
3174 definition = Qnil; 3174 definition = Qnil;
3175 3175
3176 map = call1 (Qkeymap_canonicalize, map); 3176 map = call1 (Qkeymap_canonicalize, map);
@@ -3198,7 +3198,7 @@ describe_map (Lisp_Object map, Lisp_Object prefix,
3198 3198
3199 /* Ignore bindings whose "prefix" are not really valid events. 3199 /* Ignore bindings whose "prefix" are not really valid events.
3200 (We get these in the frames and buffers menu.) */ 3200 (We get these in the frames and buffers menu.) */
3201 if (!(SYMBOLP (event) || INTEGERP (event))) 3201 if (!(SYMBOLP (event) || FIXNUMP (event)))
3202 continue; 3202 continue;
3203 3203
3204 if (nomenu && EQ (event, Qmenu_bar)) 3204 if (nomenu && EQ (event, Qmenu_bar))
@@ -3282,10 +3282,10 @@ describe_map (Lisp_Object map, Lisp_Object prefix,
3282 definition = vect[i].definition; 3282 definition = vect[i].definition;
3283 3283
3284 /* Find consecutive chars that are identically defined. */ 3284 /* Find consecutive chars that are identically defined. */
3285 if (INTEGERP (vect[i].event)) 3285 if (FIXNUMP (vect[i].event))
3286 { 3286 {
3287 while (i + 1 < slots_used 3287 while (i + 1 < slots_used
3288 && EQ (vect[i+1].event, make_number (XINT (vect[i].event) + 1)) 3288 && EQ (vect[i+1].event, make_fixnum (XINT (vect[i].event) + 1))
3289 && !NILP (Fequal (vect[i + 1].definition, definition)) 3289 && !NILP (Fequal (vect[i + 1].definition, definition))
3290 && vect[i].shadowed == vect[i + 1].shadowed) 3290 && vect[i].shadowed == vect[i + 1].shadowed)
3291 i++; 3291 i++;
@@ -3328,7 +3328,7 @@ describe_map (Lisp_Object map, Lisp_Object prefix,
3328static void 3328static void
3329describe_vector_princ (Lisp_Object elt, Lisp_Object fun) 3329describe_vector_princ (Lisp_Object elt, Lisp_Object fun)
3330{ 3330{
3331 Findent_to (make_number (16), make_number (1)); 3331 Findent_to (make_fixnum (16), make_fixnum (1));
3332 call1 (fun, elt); 3332 call1 (fun, elt);
3333 Fterpri (Qnil, Qnil); 3333 Fterpri (Qnil, Qnil);
3334} 3334}
@@ -3419,7 +3419,7 @@ describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args,
3419 /* This vector gets used to present single keys to Flookup_key. Since 3419 /* This vector gets used to present single keys to Flookup_key. Since
3420 that is done once per vector element, we don't want to cons up a 3420 that is done once per vector element, we don't want to cons up a
3421 fresh vector every time. */ 3421 fresh vector every time. */
3422 kludge = Fmake_vector (make_number (1), Qnil); 3422 kludge = Fmake_vector (make_fixnum (1), Qnil);
3423 3423
3424 if (partial) 3424 if (partial)
3425 suppress = intern ("suppress-keymap"); 3425 suppress = intern ("suppress-keymap");
@@ -3469,7 +3469,7 @@ describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args,
3469 if (!NILP (tem)) continue; 3469 if (!NILP (tem)) continue;
3470 } 3470 }
3471 3471
3472 character = make_number (starting_i); 3472 character = make_fixnum (starting_i);
3473 ASET (kludge, 0, character); 3473 ASET (kludge, 0, character);
3474 3474
3475 /* If this binding is shadowed by some other map, ignore it. */ 3475 /* If this binding is shadowed by some other map, ignore it. */
@@ -3541,7 +3541,7 @@ describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args,
3541 { 3541 {
3542 insert (" .. ", 4); 3542 insert (" .. ", 4);
3543 3543
3544 ASET (kludge, 0, make_number (i)); 3544 ASET (kludge, 0, make_fixnum (i));
3545 3545
3546 if (!NILP (elt_prefix)) 3546 if (!NILP (elt_prefix))
3547 insert1 (elt_prefix); 3547 insert1 (elt_prefix);
@@ -3618,7 +3618,7 @@ syms_of_keymap (void)
3618 3618
3619 /* Now we are ready to set up this property, so we can 3619 /* Now we are ready to set up this property, so we can
3620 create char tables. */ 3620 create char tables. */
3621 Fput (Qkeymap, Qchar_table_extra_slots, make_number (0)); 3621 Fput (Qkeymap, Qchar_table_extra_slots, make_fixnum (0));
3622 3622
3623 /* Initialize the keymaps standardly used. 3623 /* Initialize the keymaps standardly used.
3624 Each one is the value of a Lisp variable, and is also 3624 Each one is the value of a Lisp variable, and is also
@@ -3719,7 +3719,7 @@ be preferred. */);
3719 DEFSYM (Qremap, "remap"); 3719 DEFSYM (Qremap, "remap");
3720 DEFSYM (QCadvertised_binding, ":advertised-binding"); 3720 DEFSYM (QCadvertised_binding, ":advertised-binding");
3721 3721
3722 command_remapping_vector = Fmake_vector (make_number (2), Qremap); 3722 command_remapping_vector = Fmake_vector (make_fixnum (2), Qremap);
3723 staticpro (&command_remapping_vector); 3723 staticpro (&command_remapping_vector);
3724 3724
3725 where_is_cache_keymaps = Qt; 3725 where_is_cache_keymaps = Qt;