Mercurial > emacs
comparison src/keymap.c @ 72074:91ea8d22ef60
(Fdefine_key): If the key binding definition looks like an
XEmacs-style key sequence, convert it to Emacs's format.
| author | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| date | Sat, 22 Jul 2006 21:22:52 +0000 |
| parents | df96acbe2970 |
| children | 64e86769392f 02e39decdc84 858cb33ae39d |
comparison
equal
deleted
inserted
replaced
| 72073:88cafd01cf48 | 72074:91ea8d22ef60 |
|---|---|
| 1147 if (SYMBOLP (def) && !EQ (Vdefine_key_rebound_commands, Qt)) | 1147 if (SYMBOLP (def) && !EQ (Vdefine_key_rebound_commands, Qt)) |
| 1148 Vdefine_key_rebound_commands = Fcons (def, Vdefine_key_rebound_commands); | 1148 Vdefine_key_rebound_commands = Fcons (def, Vdefine_key_rebound_commands); |
| 1149 | 1149 |
| 1150 meta_bit = VECTORP (key) ? meta_modifier : 0x80; | 1150 meta_bit = VECTORP (key) ? meta_modifier : 0x80; |
| 1151 | 1151 |
| 1152 if (VECTORP (def) && ASIZE (def) > 0 && CONSP (AREF (def, make_number (0)))) | |
| 1153 { /* DEF is apparently an XEmacs-style keyboard macro. */ | |
| 1154 Lisp_Object tmp = Fmake_vector (make_number (ASIZE (def)), Qnil); | |
| 1155 int i = ASIZE (def); | |
| 1156 while (--i >= 0) | |
| 1157 { | |
| 1158 Lisp_Object c = AREF (def, i); | |
| 1159 if (CONSP (c) && lucid_event_type_list_p (c)) | |
| 1160 c = Fevent_convert_list (c); | |
| 1161 ASET (tmp, i, c); | |
| 1162 } | |
| 1163 def = tmp; | |
| 1164 } | |
| 1165 | |
| 1152 idx = 0; | 1166 idx = 0; |
| 1153 while (1) | 1167 while (1) |
| 1154 { | 1168 { |
| 1155 c = Faref (key, make_number (idx)); | 1169 c = Faref (key, make_number (idx)); |
| 1156 | 1170 |
