(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.