emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/backports-25.2 33b69a1 37/46: Warning fix in jit-l


From: Noam Postavsky
Subject: [Emacs-diffs] scratch/backports-25.2 33b69a1 37/46: Warning fix in jit-lock-mode
Date: Sun, 2 Oct 2016 14:04:50 +0000 (UTC)

branch: scratch/backports-25.2
commit 33b69a17f531312fd58b0088eb91790f69b720c0
Author: Lars Ingebrigtsen <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Warning fix in jit-lock-mode
    
    * lisp/jit-lock.el (jit-lock-mode): Don't issue a warning when
    turning the mode on in an indirect buffer, if this somehow has
    happened (bug#17738).
    
    (cherry picked from commit 8f3a6de5e240910845594e079b2734a1acc1c25c)
---
 lisp/jit-lock.el |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index 810c220..c49fa6e 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -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"))
 



reply via email to

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