]> code.delx.au - gnu-emacs/blobdiff - lisp/font-lock.el
(mouse-drag-secondary): Make sure to return nil
[gnu-emacs] / lisp / font-lock.el
index ac9978c17181ae3a5b2ca16fc34e21e929d8d720..fd3ccdc0d1a948a6ddf1cda35cc375579d69c7b6 100644 (file)
@@ -501,9 +501,10 @@ its mode hook."
     (set (make-local-variable 'font-lock-mode) on-p)
     ;; Turn on Font Lock mode.
     (when on-p
-      (make-local-hook 'after-change-functions)
-      (add-hook 'after-change-functions 'font-lock-after-change-function nil t)
       (font-lock-set-defaults)
+      (unless (eq font-lock-fontify-region-function 'ignore)
+       (make-local-hook 'after-change-functions)
+       (add-hook 'after-change-functions 'font-lock-after-change-function nil t))
       (font-lock-turn-on-thing-lock)
       (run-hooks 'font-lock-mode-hook)
       ;; Fontify the buffer if we have to.