From: Chong Yidong Date: Mon, 27 Feb 2012 02:34:12 +0000 (+0800) Subject: * font-lock.el (font-lock-specified-p): Rename from font-lock-spec-present. X-Git-Tag: emacs-pretest-24.0.94~1 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c98c62764aad6136abc78e7e14cc89f938a17aec;p=emacs.git * font-lock.el (font-lock-specified-p): Rename from font-lock-spec-present. Callers changed. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 57ae84c0fff..c97aa54ca0b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-02-27 Chong Yidong + + * font-lock.el (font-lock-specified-p): Rename from + font-lock-spec-present. Callers changed. + 2012-02-27 Daniel Hackney (tiny change) * emacs-lisp/package.el (package-compute-transaction): Handle diff --git a/lisp/font-core.el b/lisp/font-core.el index 4a88d973913..fc647a3727b 100644 --- a/lisp/font-core.el +++ b/lisp/font-core.el @@ -192,7 +192,7 @@ this function onto `change-major-mode-hook'." ;; Only do hard work if the mode has specified stuff in ;; `font-lock-defaults'. - (when (font-lock-spec-present mode) + (when (font-lock-specified-p mode) (font-lock-mode-internal mode))) (defun turn-on-font-lock () diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 7750b30f096..1a7022da012 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -629,10 +629,13 @@ Major/minor modes can set this variable if they know which option applies.") ;; Shut up the byte compiler. (defvar font-lock-face-attributes)) ; Obsolete but respected if set. -(defun font-lock-spec-present (mode) - ;; Is there enough specification to do fontification at all? +(defun font-lock-specified-p (mode) + "Return non-nil if the current buffer is ready for fontification. +The MODE argument, if non-nil, means Font Lock mode is about to +be enabled." (or font-lock-defaults - (if (boundp 'font-lock-keywords) font-lock-keywords) + (and (boundp 'font-lock-keywords) + font-lock-keywords) (and mode (boundp 'font-lock-set-defaults) font-lock-set-defaults @@ -643,7 +646,7 @@ Major/minor modes can set this variable if they know which option applies.") ;; The first fontification after turning the mode on. This must ;; only be called after the mode hooks have been run. (when (and font-lock-mode - (font-lock-spec-present t)) + (font-lock-specified-p t)) (let ((max-size (font-lock-value-in-major-mode font-lock-maximum-size))) (cond (font-lock-fontified nil)