;;; font-core.el --- Core interface to font-lock
-;; Copyright (C) 1992-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1992-2014 Free Software Foundation, Inc.
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
;; Keywords: languages, faces
;; Package: emacs
your own function which is called when `font-lock-mode' is toggled via
`font-lock-function'. "
nil nil nil
+ :after-hook (font-lock-initial-fontify)
;; Don't turn on Font Lock mode if we don't have a display (we're running a
;; batch job) or if the buffer is invisible (the name starts with a space).
(when (or noninteractive (eq (aref (buffer-name) 0) ?\s))
;; Only do hard work if the mode has specified stuff in
;; `font-lock-defaults'.
- (when (or font-lock-defaults
- (if (boundp 'font-lock-keywords) font-lock-keywords)
- (and mode
- (boundp 'font-lock-set-defaults)
- font-lock-set-defaults
- font-lock-major-mode
- (not (eq font-lock-major-mode major-mode))))
+ (when (font-lock-specified-p mode)
(font-lock-mode-internal mode)))
(defun turn-on-font-lock ()