aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/files.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 1ffd17eefd..6356fcb8c2 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1738,7 +1738,11 @@ in that case, this function acts as if `enable-local-variables' were t."
(hack-local-variables)))
;; Turn font lock off and on, to make sure it takes account of
;; whatever file local variables are relevant to it.
- (when (and font-lock-mode (eq (car font-lock-keywords) t))
+ (when (and font-lock-mode
+ ;; Font-lock-mode (now in font-core.el) can be ON when
+ ;; font-lock.el still hasn't been loaded.
+ (boundp 'font-lock-keywords)
+ (eq (car font-lock-keywords) t))
(setq font-lock-keywords (cadr font-lock-keywords))
(font-lock-mode 1))