diff options
author | Glenn Morris <rgm@gnu.org> | 2020-03-04 13:57:58 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2020-03-04 13:57:58 -0800 |
commit | b5474ba1607fdca620cdee40a11cc0120697fc58 (patch) | |
tree | 2a6f3706a050270a01f008355bf11e6d1532e2f5 /lisp/subr.el | |
parent | 79f196551a23ec54c6ed67a094aedb4597d36cf5 (diff) | |
parent | a3c2d186eb514b505e61c2a89a1df886dbfcb06b (diff) | |
download | emacs-b5474ba1607fdca620cdee40a11cc0120697fc58.tar.gz emacs-b5474ba1607fdca620cdee40a11cc0120697fc58.tar.bz2 emacs-b5474ba1607fdca620cdee40a11cc0120697fc58.zip |
Merge from origin/emacs-27
a3c2d186eb (origin/emacs-27) CC Mode: Fix the handling of two adjacen...
a1abf73c76 Fix combine-change-calls-1 for when buffer-undo-list is t
db37dd2e84 Don't misinterpret doc string as initial value
40b217c2bf Bump checkdoc-version to match library header
60418a1ab2 Explain how to unset mode bindings (Bug#39802)
7cafbbe964 Fix describe-variable on values with circular syntax (Bug#...
592b1cfee9 Improve documentation of next-error-highlight-no-select (b...
Diffstat (limited to 'lisp/subr.el')
-rw-r--r-- | lisp/subr.el | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 96b98c6a5b3..13515ca7da1 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3967,19 +3967,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 |