1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-05 11:45:45 +00:00

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).
This commit is contained in:
Lars Ingebrigtsen 2016-04-29 22:44:13 +02:00
parent 2c3ab9b6e3
commit 8f3a6de5e2

View 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"))