Mercurial > emacs
comparison src/macros.c @ 1682:af0995b9b142
* macros.c (Fend_kbd_macro): Don't use XFASTINT to check if arg is
negative; XFASTINT only works on values known to be positive.
(Fexecute_kbd_macro): Check QUIT in the repetition loop. If the
macro is null, no characters are actually being read, so this
matters.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sat, 12 Dec 1992 15:35:41 +0000 |
parents | 529171c8b71c |
children | 4fe063d2aecf |
comparison
equal
deleted
inserted
replaced
1681:a03b87a92614 | 1682:af0995b9b142 |
---|---|
113 | 113 |
114 if (XFASTINT (arg) == 0) | 114 if (XFASTINT (arg) == 0) |
115 Fexecute_kbd_macro (Vlast_kbd_macro, arg); | 115 Fexecute_kbd_macro (Vlast_kbd_macro, arg); |
116 else | 116 else |
117 { | 117 { |
118 XFASTINT (arg)--; | 118 XSETINT (arg, XINT (arg)-1); |
119 if (XFASTINT (arg) > 0) | 119 if (XINT (arg) > 0) |
120 Fexecute_kbd_macro (Vlast_kbd_macro, arg); | 120 Fexecute_kbd_macro (Vlast_kbd_macro, arg); |
121 } | 121 } |
122 return Qnil; | 122 return Qnil; |
123 } | 123 } |
124 | 124 |
215 { | 215 { |
216 Vexecuting_macro = final; | 216 Vexecuting_macro = final; |
217 executing_macro_index = 0; | 217 executing_macro_index = 0; |
218 | 218 |
219 command_loop_1 (); | 219 command_loop_1 (); |
220 | |
221 QUIT; | |
220 } | 222 } |
221 while (--repeat && (XTYPE (Vexecuting_macro) == Lisp_String | 223 while (--repeat && (XTYPE (Vexecuting_macro) == Lisp_String |
222 || XTYPE (Vexecuting_macro) == Lisp_Vector)); | 224 || XTYPE (Vexecuting_macro) == Lisp_Vector)); |
223 | 225 |
224 UNGCPRO; | 226 UNGCPRO; |