summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-09-07 04:08:18 +0000
committerRichard M. Stallman <rms@gnu.org>1997-09-07 04:08:18 +0000
commit15f3e0377df19bc3969c7e57bb739a37c449daba (patch)
tree421d3762413aacbd00bdc5380632f3db1e2773a9
parent289b10a8e228d53fe833d8260ee9f0235ac09a3c (diff)
downloademacs-15f3e0377df19bc3969c7e57bb739a37c449daba.tar.gz
(font-lock-comment-face, etc.):
defvars moved up to avoid warnings. (font-lock-face-attributes, global-font-lock-mode): Add defvars.
-rw-r--r--lisp/font-lock.el68
1 files changed, 36 insertions, 32 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index f06caa531c4..b0a29fd7a64 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -597,6 +597,39 @@ This is normally set via `font-lock-defaults'.")
(defvar font-lock-mode-hook nil
"Function or functions to run on entry to Font Lock mode.")
+;; Originally these variable values were face names such as `bold' etc.
+;; Now we create our own faces, but we keep these variables for compatibility
+;; and they give users another mechanism for changing face appearance.
+;; We now allow a FACENAME in `font-lock-keywords' to be any expression that
+;; returns a face. So the easiest thing is to continue using these variables,
+;; rather than sometimes evaling FACENAME and sometimes not. sm.
+(defvar font-lock-comment-face 'font-lock-comment-face
+ "Face name to use for comments.")
+
+(defvar font-lock-string-face 'font-lock-string-face
+ "Face name to use for strings.")
+
+(defvar font-lock-keyword-face 'font-lock-keyword-face
+ "Face name to use for keywords.")
+
+(defvar font-lock-builtin-face 'font-lock-builtin-face
+ "Face name to use for builtins.")
+
+(defvar font-lock-function-name-face 'font-lock-function-name-face
+ "Face name to use for function names.")
+
+(defvar font-lock-variable-name-face 'font-lock-variable-name-face
+ "Face name to use for variable names.")
+
+(defvar font-lock-type-face 'font-lock-type-face
+ "Face name to use for type names.")
+
+(defvar font-lock-reference-face 'font-lock-reference-face
+ "Face name to use for reference names.")
+
+(defvar font-lock-warning-face 'font-lock-warning-face
+ "Face name to use for things that should stand out.")
+
;; Font Lock mode.
(eval-when-compile
@@ -803,6 +836,8 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types',
(defvar font-lock-buffers nil) ; For remembering buffers.
+(defvar global-font-lock-mode) ;Prevent warnings in defun below.
+
;;;###autoload
(defun global-font-lock-mode (&optional arg message)
"Toggle Global Font Lock mode.
@@ -1581,38 +1616,7 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
;;; Colour etc. support.
-;; Originally these variable values were face names such as `bold' etc.
-;; Now we create our own faces, but we keep these variables for compatibility
-;; and they give users another mechanism for changing face appearance.
-;; We now allow a FACENAME in `font-lock-keywords' to be any expression that
-;; returns a face. So the easiest thing is to continue using these variables,
-;; rather than sometimes evaling FACENAME and sometimes not. sm.
-(defvar font-lock-comment-face 'font-lock-comment-face
- "Face name to use for comments.")
-
-(defvar font-lock-string-face 'font-lock-string-face
- "Face name to use for strings.")
-
-(defvar font-lock-keyword-face 'font-lock-keyword-face
- "Face name to use for keywords.")
-
-(defvar font-lock-builtin-face 'font-lock-builtin-face
- "Face name to use for builtins.")
-
-(defvar font-lock-function-name-face 'font-lock-function-name-face
- "Face name to use for function names.")
-
-(defvar font-lock-variable-name-face 'font-lock-variable-name-face
- "Face name to use for variable names.")
-
-(defvar font-lock-type-face 'font-lock-type-face
- "Face name to use for type names.")
-
-(defvar font-lock-reference-face 'font-lock-reference-face
- "Face name to use for reference names.")
-
-(defvar font-lock-warning-face 'font-lock-warning-face
- "Face name to use for things that should stand out.")
+(defvar font-lock-face-attributes) ;Avoid compiler warnings below.
;; Originally face attributes were specified via `font-lock-face-attributes'.
;; Users then changed the default face attributes by setting that variable.