diff options
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/keymap.c b/src/keymap.c index 3a79bf4c5aa..a1c9eb6c10e 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -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_fixnum (ASIZE (def)), Qnil); | 1096 | Lisp_Object tmp = make_nil_vector (ASIZE (def)); |
| 1097 | ptrdiff_t i = ASIZE (def); | 1097 | ptrdiff_t i = ASIZE (def); |
| 1098 | while (--i >= 0) | 1098 | while (--i >= 0) |
| 1099 | { | 1099 | { |
| @@ -1931,14 +1931,12 @@ then the value includes only maps for prefixes that start with PREFIX. */) | |||
| 1931 | we don't have to deal with the possibility of a string. */ | 1931 | we don't have to deal with the possibility of a string. */ |
| 1932 | if (STRINGP (prefix)) | 1932 | if (STRINGP (prefix)) |
| 1933 | { | 1933 | { |
| 1934 | int i, i_byte, c; | 1934 | ptrdiff_t i_byte = 0; |
| 1935 | Lisp_Object copy; | 1935 | Lisp_Object copy = make_nil_vector (SCHARS (prefix)); |
| 1936 | 1936 | for (ptrdiff_t i = 0; i < SCHARS (prefix); ) | |
| 1937 | copy = Fmake_vector (make_fixnum (SCHARS (prefix)), Qnil); | ||
| 1938 | for (i = 0, i_byte = 0; i < SCHARS (prefix);) | ||
| 1939 | { | 1937 | { |
| 1940 | int i_before = i; | 1938 | ptrdiff_t i_before = i; |
| 1941 | 1939 | int c; | |
| 1942 | FETCH_STRING_CHAR_ADVANCE (c, prefix, i, i_byte); | 1940 | FETCH_STRING_CHAR_ADVANCE (c, prefix, i, i_byte); |
| 1943 | if (SINGLE_BYTE_CHAR_P (c) && (c & 0200)) | 1941 | if (SINGLE_BYTE_CHAR_P (c) && (c & 0200)) |
| 1944 | c ^= 0200 | meta_modifier; | 1942 | c ^= 0200 | meta_modifier; |
| @@ -3141,7 +3139,7 @@ describe_map (Lisp_Object map, Lisp_Object prefix, | |||
| 3141 | /* This vector gets used to present single keys to Flookup_key. Since | 3139 | /* This vector gets used to present single keys to Flookup_key. Since |
| 3142 | that is done once per keymap element, we don't want to cons up a | 3140 | that is done once per keymap element, we don't want to cons up a |
| 3143 | fresh vector every time. */ | 3141 | fresh vector every time. */ |
| 3144 | kludge = Fmake_vector (make_fixnum (1), Qnil); | 3142 | kludge = make_nil_vector (1); |
| 3145 | definition = Qnil; | 3143 | definition = Qnil; |
| 3146 | 3144 | ||
| 3147 | map = call1 (Qkeymap_canonicalize, map); | 3145 | map = call1 (Qkeymap_canonicalize, map); |
| @@ -3390,7 +3388,7 @@ describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args, | |||
| 3390 | /* This vector gets used to present single keys to Flookup_key. Since | 3388 | /* This vector gets used to present single keys to Flookup_key. Since |
| 3391 | that is done once per vector element, we don't want to cons up a | 3389 | that is done once per vector element, we don't want to cons up a |
| 3392 | fresh vector every time. */ | 3390 | fresh vector every time. */ |
| 3393 | kludge = Fmake_vector (make_fixnum (1), Qnil); | 3391 | kludge = make_nil_vector (1); |
| 3394 | 3392 | ||
| 3395 | if (partial) | 3393 | if (partial) |
| 3396 | suppress = intern ("suppress-keymap"); | 3394 | suppress = intern ("suppress-keymap"); |
| @@ -3690,7 +3688,7 @@ be preferred. */); | |||
| 3690 | DEFSYM (Qremap, "remap"); | 3688 | DEFSYM (Qremap, "remap"); |
| 3691 | DEFSYM (QCadvertised_binding, ":advertised-binding"); | 3689 | DEFSYM (QCadvertised_binding, ":advertised-binding"); |
| 3692 | 3690 | ||
| 3693 | command_remapping_vector = Fmake_vector (make_fixnum (2), Qremap); | 3691 | command_remapping_vector = make_vector (2, Qremap); |
| 3694 | staticpro (&command_remapping_vector); | 3692 | staticpro (&command_remapping_vector); |
| 3695 | 3693 | ||
| 3696 | where_is_cache_keymaps = Qt; | 3694 | where_is_cache_keymaps = Qt; |