aboutsummaryrefslogtreecommitdiffstats
path: root/src/indent.c
diff options
context:
space:
mode:
authorPaul Eggert2017-02-01 15:18:44 -0800
committerPaul Eggert2017-02-01 15:23:19 -0800
commitb4c9f9120d8b0da0593f2fbde69b40374f56451d (patch)
tree8f40be80730a41e83e58e0632ff539ac752eb453 /src/indent.c
parentb01ac672be1277833964d2d53f6dd26560c70343 (diff)
downloademacs-b4c9f9120d8b0da0593f2fbde69b40374f56451d.tar.gz
emacs-b4c9f9120d8b0da0593f2fbde69b40374f56451d.zip
Fix quitting bug when buffers are frozen
Problem noted by Eli Zaretskii in: http://lists.gnu.org/archive/html/emacs-devel/2017-01/msg00721.html This patch also fixes some other issues in that report. * src/lisp.h (incr_rarely_quit): Remove. All callers changed to use rarely_quit directly. * src/search.c (freeze_buffer_relocation) (thaw_buffer_relocation): New functions. (looking_at_1, fast_looking_at, search_buffer): Use them to fix bug when quitting when buffers are frozen. * src/sysdep.c (emacs_intr_read): Rename from emacs_nointr_read. All uses changed.
Diffstat (limited to 'src/indent.c')
-rw-r--r--src/indent.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/indent.c b/src/indent.c
index aff14abfd20..f630ebb847c 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1215,7 +1215,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
1215 1215
1216 while (true) 1216 while (true)
1217 { 1217 {
1218 incr_rarely_quit (&quit_count); 1218 rarely_quit (++quit_count);
1219 1219
1220 while (pos == next_boundary) 1220 while (pos == next_boundary)
1221 { 1221 {
@@ -1282,7 +1282,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
1282 pos_byte = CHAR_TO_BYTE (pos); 1282 pos_byte = CHAR_TO_BYTE (pos);
1283 } 1283 }
1284 1284
1285 incr_rarely_quit (&quit_count); 1285 rarely_quit (++quit_count);
1286 } 1286 }
1287 1287
1288 /* Handle right margin. */ 1288 /* Handle right margin. */
@@ -1605,7 +1605,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
1605 pos = find_before_next_newline (pos, to, 1, &pos_byte); 1605 pos = find_before_next_newline (pos, to, 1, &pos_byte);
1606 if (pos < to) 1606 if (pos < to)
1607 INC_BOTH (pos, pos_byte); 1607 INC_BOTH (pos, pos_byte);
1608 incr_rarely_quit (&quit_count); 1608 rarely_quit (++quit_count);
1609 } 1609 }
1610 while (pos < to 1610 while (pos < to
1611 && indented_beyond_p (pos, pos_byte, 1611 && indented_beyond_p (pos, pos_byte,