]> code.delx.au - gnu-emacs/commitdiff
* font-lock.el (font-lock-specified-p): Rename from font-lock-spec-present.
authorChong Yidong <cyd@gnu.org>
Mon, 27 Feb 2012 02:34:12 +0000 (10:34 +0800)
committerChong Yidong <cyd@gnu.org>
Mon, 27 Feb 2012 02:34:12 +0000 (10:34 +0800)
Callers changed.

lisp/ChangeLog
lisp/font-core.el
lisp/font-lock.el

index 57ae84c0fff8dc2c63e02ac5ac4e965e93f3fba3..c97aa54ca0b8c1f045385d4ebafce7df7e8b38fc 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-27  Chong Yidong  <cyd@gnu.org>
+
+       * font-lock.el (font-lock-specified-p): Rename from
+       font-lock-spec-present.  Callers changed.
+
 2012-02-27  Daniel Hackney  <dan@haxney.org>  (tiny change)
 
        * emacs-lisp/package.el (package-compute-transaction): Handle
index 4a88d9739130d595b5ef0ceb6c6bb462dd538168..fc647a3727b112731dc41bee9d7d407313ed63b7 100644 (file)
@@ -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 ()
index 7750b30f09666e69f55f44d1493d3526ef6e7e8f..1a7022da0129cf67eb1e234e59dc11b072b8e5d6 100644 (file)
@@ -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)