aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/insdel.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/insdel.c b/src/insdel.c
index 1231bb2682b..85fffd8fd16 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -2178,6 +2178,7 @@ signal_after_change (ptrdiff_t charpos, ptrdiff_t lendel, ptrdiff_t lenins)
2178{ 2178{
2179 ptrdiff_t count = SPECPDL_INDEX (); 2179 ptrdiff_t count = SPECPDL_INDEX ();
2180 struct rvoe_arg rvoe_arg; 2180 struct rvoe_arg rvoe_arg;
2181 Lisp_Object tmp;
2181 2182
2182 if (inhibit_modification_hooks) 2183 if (inhibit_modification_hooks)
2183 return; 2184 return;
@@ -2186,7 +2187,16 @@ signal_after_change (ptrdiff_t charpos, ptrdiff_t lendel, ptrdiff_t lenins)
2186 and there are no before-change functions, 2187 and there are no before-change functions,
2187 just record the args that we were going to use. */ 2188 just record the args that we were going to use. */
2188 if (! NILP (Vcombine_after_change_calls) 2189 if (! NILP (Vcombine_after_change_calls)
2189 && NILP (Vbefore_change_functions) 2190 /* It's OK to defer after-changes even if syntax-ppss-flush-cache
2191 * is on before-change-functions, which is common enough to be worth
2192 * adding a special case for it. */
2193 && (NILP (Vbefore_change_functions)
2194 || (CONSP (Vbefore_change_functions)
2195 && EQ (Qt, XCAR (Vbefore_change_functions))
2196 && NILP (Fdefault_value (Qbefore_change_functions))
2197 && CONSP (tmp = XCDR (Vbefore_change_functions))
2198 && NILP (XCDR (tmp))
2199 && EQ (XCAR (tmp), Qsyntax_ppss_flush_cache)))
2190 && !buffer_has_overlays ()) 2200 && !buffer_has_overlays ())
2191 { 2201 {
2192 Lisp_Object elt; 2202 Lisp_Object elt;
@@ -2343,6 +2353,7 @@ syms_of_insdel (void)
2343 combine_after_change_buffer = Qnil; 2353 combine_after_change_buffer = Qnil;
2344 2354
2345 DEFSYM (Qundo_auto__undoable_change, "undo-auto--undoable-change"); 2355 DEFSYM (Qundo_auto__undoable_change, "undo-auto--undoable-change");
2356 DEFSYM (Qsyntax_ppss_flush_cache, "syntax-ppss-flush-cache");
2346 2357
2347 DEFVAR_LISP ("combine-after-change-calls", Vcombine_after_change_calls, 2358 DEFVAR_LISP ("combine-after-change-calls", Vcombine_after_change_calls,
2348 doc: /* Used internally by the function `combine-after-change-calls' macro. */); 2359 doc: /* Used internally by the function `combine-after-change-calls' macro. */);