diff options
author | Alan Mackenzie <acm@muc.de> | 2017-02-12 10:59:03 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2017-02-12 10:59:03 +0000 |
commit | f4d5b687150810129b7a1d5b006e31ccf82b691b (patch) | |
tree | 4229b13800349032697daae3904dc3773e6b7a80 /src/indent.c | |
parent | d5514332d4a6092673ce1f78fadcae0c57f7be64 (diff) | |
parent | 148100d98319499f0ac6f57b8be08cbd14884a5c (diff) | |
download | emacs-comment-cache.tar.gz |
Merge branch 'master' into comment-cachecomment-cache
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, continuation_glyph_width = 0; /* In the fringe. */ #endif - immediate_quit = 1; - QUIT; - /* It's just impossible to be too paranoid here. */ eassert (from == BYTE_TO_CHAR (frombyte) && frombyte == CHAR_TO_BYTE (from)); @@ -1214,8 +1211,12 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos, cmp_it.id = -1; composition_compute_stop_pos (&cmp_it, pos, pos_byte, to, Qnil); - while (1) + unsigned short int quit_count = 0; + + while (true) { + rarely_quit (++quit_count); + while (pos == next_boundary) { ptrdiff_t pos_here = pos; @@ -1280,6 +1281,8 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos, pos = newpos; pos_byte = CHAR_TO_BYTE (pos); } + + rarely_quit (++quit_count); } /* Handle right margin. */ @@ -1602,6 +1605,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos, pos = find_before_next_newline (pos, to, 1, &pos_byte); if (pos < to) INC_BOTH (pos, pos_byte); + rarely_quit (++quit_count); } while (pos < to && indented_beyond_p (pos, pos_byte, @@ -1694,7 +1698,6 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos, /* Nonzero if have just continued a line */ val_compute_motion.contin = (contin_hpos && prev_hpos == 0); - immediate_quit = 0; return &val_compute_motion; } |