diff options
| author | Jim Blandy | 1992-12-12 15:35:41 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-12-12 15:35:41 +0000 |
| commit | e86f81cc46f817117847e8086d05092e08079d4c (patch) | |
| tree | 94b99e818709b936dfc4bcda56b0d192ede4844d /src | |
| parent | 997bf68d0a06c48d671e0d2d810ec070c4dba78b (diff) | |
| download | emacs-e86f81cc46f817117847e8086d05092e08079d4c.tar.gz emacs-e86f81cc46f817117847e8086d05092e08079d4c.zip | |
* 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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/macros.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/macros.c b/src/macros.c index 64e91776f67..194219bb1f0 100644 --- a/src/macros.c +++ b/src/macros.c | |||
| @@ -115,8 +115,8 @@ An argument of zero means repeat until error.") | |||
| 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; |
| @@ -217,6 +217,8 @@ COUNT is a repeat count, or nil for once, or 0 for infinite loop.") | |||
| 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)); |