]> code.delx.au - gnu-emacs/blobdiff - lisp/jit-lock.el
; Merge from origin/emacs-25
[gnu-emacs] / lisp / jit-lock.el
index 810c2205160ecbd091b98fca6921b3d5546754c9..c49fa6ed6c153699b586a89fde9450c7dd64b217 100644 (file)
@@ -195,9 +195,11 @@ the variable `jit-lock-stealth-nice'.
 If you need to debug code run from jit-lock, see `jit-lock-debug-mode'."
   (setq jit-lock-mode arg)
   (cond
-   ((buffer-base-buffer)
-    ;; We're in an indirect buffer.  This doesn't work because jit-lock relies
-    ;; on the `fontified' text-property which is shared with the base buffer.
+   ((and (buffer-base-buffer)
+         jit-lock-mode)
+    ;; We're in an indirect buffer, and we're turning the mode on.
+    ;; This doesn't work because jit-lock relies on the `fontified'
+    ;; text-property which is shared with the base buffer.
     (setq jit-lock-mode nil)
     (message "Not enabling jit-lock: it does not work in indirect buffer"))