emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-27 a1abf73: Fix combine-change-calls-1 for when buffer-undo-list i


From: Alan Mackenzie
Subject: emacs-27 a1abf73: Fix combine-change-calls-1 for when buffer-undo-list is t
Date: Wed, 4 Mar 2020 14:52:21 -0500 (EST)

branch: emacs-27
commit a1abf73c7642339c111646afed1d5d05ecada9c7
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>

    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.
---
 lisp/subr.el | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)

diff --git a/lisp/subr.el b/lisp/subr.el
index c1c4cad..5b94343 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3959,19 +3959,18 @@ 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
-                 ;; (e.g. via a regexp-search or sexp-movement trigerring
-                 ;; on-the-fly syntax-propertize), make sure that this gets
-                 ;; properly refreshed after subsequent changes.
-                 (if (memq #'syntax-ppss-flush-cache before-change-functions)
-                     '(syntax-ppss-flush-cache)))
-                after-change-functions)
-           (setq result (funcall body)))
-         (let ((ap-elt
+       (let (;; (inhibit-modification-hooks t)
+              (before-change-functions
+               ;; Ugly Hack: if the body uses syntax-ppss/syntax-propertize
+               ;; (e.g. via a regexp-search or sexp-movement trigerring
+               ;; on-the-fly syntax-propertize), make sure that this gets
+               ;; properly refreshed after subsequent changes.
+               (if (memq #'syntax-ppss-flush-cache before-change-functions)
+                   '(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)
                       beg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]