diff options
Diffstat (limited to 'src/indent.c')
| -rw-r--r-- | src/indent.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/indent.c b/src/indent.c index 34449955a6c..f630ebb847c 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -1200,9 +1200,6 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos, | |||
| 1200 | continuation_glyph_width = 0; /* In the fringe. */ | 1200 | continuation_glyph_width = 0; /* In the fringe. */ |
| 1201 | #endif | 1201 | #endif |
| 1202 | 1202 | ||
| 1203 | immediate_quit = 1; | ||
| 1204 | QUIT; | ||
| 1205 | |||
| 1206 | /* It's just impossible to be too paranoid here. */ | 1203 | /* It's just impossible to be too paranoid here. */ |
| 1207 | eassert (from == BYTE_TO_CHAR (frombyte) && frombyte == CHAR_TO_BYTE (from)); | 1204 | eassert (from == BYTE_TO_CHAR (frombyte) && frombyte == CHAR_TO_BYTE (from)); |
| 1208 | 1205 | ||
| @@ -1214,8 +1211,12 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos, | |||
| 1214 | cmp_it.id = -1; | 1211 | cmp_it.id = -1; |
| 1215 | composition_compute_stop_pos (&cmp_it, pos, pos_byte, to, Qnil); | 1212 | composition_compute_stop_pos (&cmp_it, pos, pos_byte, to, Qnil); |
| 1216 | 1213 | ||
| 1217 | while (1) | 1214 | unsigned short int quit_count = 0; |
| 1215 | |||
| 1216 | while (true) | ||
| 1218 | { | 1217 | { |
| 1218 | rarely_quit (++quit_count); | ||
| 1219 | |||
| 1219 | while (pos == next_boundary) | 1220 | while (pos == next_boundary) |
| 1220 | { | 1221 | { |
| 1221 | ptrdiff_t pos_here = pos; | 1222 | ptrdiff_t pos_here = pos; |
| @@ -1280,6 +1281,8 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos, | |||
| 1280 | pos = newpos; | 1281 | pos = newpos; |
| 1281 | pos_byte = CHAR_TO_BYTE (pos); | 1282 | pos_byte = CHAR_TO_BYTE (pos); |
| 1282 | } | 1283 | } |
| 1284 | |||
| 1285 | rarely_quit (++quit_count); | ||
| 1283 | } | 1286 | } |
| 1284 | 1287 | ||
| 1285 | /* Handle right margin. */ | 1288 | /* Handle right margin. */ |
| @@ -1602,6 +1605,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos, | |||
| 1602 | pos = find_before_next_newline (pos, to, 1, &pos_byte); | 1605 | pos = find_before_next_newline (pos, to, 1, &pos_byte); |
| 1603 | if (pos < to) | 1606 | if (pos < to) |
| 1604 | INC_BOTH (pos, pos_byte); | 1607 | INC_BOTH (pos, pos_byte); |
| 1608 | rarely_quit (++quit_count); | ||
| 1605 | } | 1609 | } |
| 1606 | while (pos < to | 1610 | while (pos < to |
| 1607 | && indented_beyond_p (pos, pos_byte, | 1611 | && indented_beyond_p (pos, pos_byte, |
| @@ -1694,7 +1698,6 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos, | |||
| 1694 | /* Nonzero if have just continued a line */ | 1698 | /* Nonzero if have just continued a line */ |
| 1695 | val_compute_motion.contin = (contin_hpos && prev_hpos == 0); | 1699 | val_compute_motion.contin = (contin_hpos && prev_hpos == 0); |
| 1696 | 1700 | ||
| 1697 | immediate_quit = 0; | ||
| 1698 | return &val_compute_motion; | 1701 | return &val_compute_motion; |
| 1699 | } | 1702 | } |
| 1700 | 1703 | ||