From da4f1c0338b2b98f97a553568c4b80872484ee97 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 7 Jan 2017 15:47:37 -0500 Subject: [PATCH v1] Inhibit modification hooks buffer locally `with-silent-modifications' let-binds `inhibit-modification-hooks' to t globally. So modifications to other buffers don't trigger modication hooks. This causes unexpected results when functions called from `jit-lock-function' use temporary buffers and modifies them (Bug#25132). * lisp/subr.el (with-silent-modifications): Bind inhibit-modification-hooks buffer locally. --- lisp/subr.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/subr.el b/lisp/subr.el index 5377416..fe20d68 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3298,7 +3298,8 @@ with-silent-modifications `(let* ((,modified (buffer-modified-p)) (buffer-undo-list t) (inhibit-read-only t) - (inhibit-modification-hooks t)) + (inhibit-modification-hooks + (progn (make-local-variable 'inhibit-modification-hooks) t))) (unwind-protect (progn ,@body) -- 2.9.3