1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-11 00:30:17 -08:00

Fix combine-change-calls-1 for when buffer-undo-list is t

* lisp/subr.c (combine-change-calls-1): Bind before/after-change-functions to
nil also when buffer-undo-list is t.
This commit is contained in:
Alan Mackenzie 2020-03-04 19:50:38 +00:00
parent db37dd2e84
commit a1abf73c76

View file

@ -3959,8 +3959,6 @@ the function `undo--wrap-and-run-primitive-undo'."
(let ((undo--combining-change-calls t))
(if (not inhibit-modification-hooks)
(run-hook-with-args 'before-change-functions beg end))
(if (eq buffer-undo-list t)
(setq result (funcall body))
(let (;; (inhibit-modification-hooks t)
(before-change-functions
;; Ugly Hack: if the body uses syntax-ppss/syntax-propertize
@ -3971,6 +3969,7 @@ the function `undo--wrap-and-run-primitive-undo'."
'(syntax-ppss-flush-cache)))
after-change-functions)
(setq result (funcall body)))
(when (not (eq buffer-undo-list t))
(let ((ap-elt
(list 'apply
(- end end-marker)