diff options
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/keymap.c b/src/keymap.c index 0197319957c..9e1f01e7a79 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -751,7 +751,7 @@ usage: (map-keymap FUNCTION KEYMAP) */) | |||
| 751 | if (INTEGERP (function)) | 751 | if (INTEGERP (function)) |
| 752 | /* We have to stop integers early since map_keymap gives them special | 752 | /* We have to stop integers early since map_keymap gives them special |
| 753 | significance. */ | 753 | significance. */ |
| 754 | Fsignal (Qinvalid_function, Fcons (function, Qnil)); | 754 | xsignal1 (Qinvalid_function, function); |
| 755 | if (! NILP (sort_first)) | 755 | if (! NILP (sort_first)) |
| 756 | return call3 (intern ("map-keymap-internal"), function, keymap, Qt); | 756 | return call3 (intern ("map-keymap-internal"), function, keymap, Qt); |
| 757 | 757 | ||
| @@ -1142,6 +1142,20 @@ binding KEY to DEF is added at the front of KEYMAP. */) | |||
| 1142 | 1142 | ||
| 1143 | meta_bit = VECTORP (key) ? meta_modifier : 0x80; | 1143 | meta_bit = VECTORP (key) ? meta_modifier : 0x80; |
| 1144 | 1144 | ||
| 1145 | if (VECTORP (def) && ASIZE (def) > 0 && CONSP (AREF (def, make_number (0)))) | ||
| 1146 | { /* DEF is apparently an XEmacs-style keyboard macro. */ | ||
| 1147 | Lisp_Object tmp = Fmake_vector (make_number (ASIZE (def)), Qnil); | ||
| 1148 | int i = ASIZE (def); | ||
| 1149 | while (--i >= 0) | ||
| 1150 | { | ||
| 1151 | Lisp_Object c = AREF (def, i); | ||
| 1152 | if (CONSP (c) && lucid_event_type_list_p (c)) | ||
| 1153 | c = Fevent_convert_list (c); | ||
| 1154 | ASET (tmp, i, c); | ||
| 1155 | } | ||
| 1156 | def = tmp; | ||
| 1157 | } | ||
| 1158 | |||
| 1145 | idx = 0; | 1159 | idx = 0; |
| 1146 | while (1) | 1160 | while (1) |
| 1147 | { | 1161 | { |