diff options
author | Nickolas Lloyd <ultrageek.lloyd@gmail.com> | 2017-02-01 22:31:55 -0500 |
---|---|---|
committer | Nickolas Lloyd <ultrageek.lloyd@gmail.com> | 2017-02-01 22:31:55 -0500 |
commit | 9a15b5509abb49a11c97c1101ad216f4ef258368 (patch) | |
tree | 7311337d92833cb8f233eaa696a967a15a306a80 /src/indent.c | |
parent | 5d8f2548ceaa5a0b33c08a39f1d6c11071ec63aa (diff) | |
parent | 70d36dda26465b43c1a63e8e13153e070af86456 (diff) | |
download | emacs-nick.lloyd-bytecode-jit.tar.gz |
Merge branch 'master' into nick.lloyd-bytecode-jitnick.lloyd-bytecode-jit
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 23951a16eb6..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 = true; - maybe_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 = false; return &val_compute_motion; } |