aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-09-07 04:08:18 +0000
committerRichard M. Stallman1997-09-07 04:08:18 +0000
commit1b317e2c3e0449c92cb284c5be4e86f1ed7a09e6 (patch)
tree2ed476b2ff6409cce9e00ff3dae1a72579d24e00
parent019612373cd7c9b1f0a50142ae7f0dac9f2b14cb (diff)
downloademacs-1b317e2c3e0449c92cb284c5be4e86f1ed7a09e6.tar.gz
emacs-1b317e2c3e0449c92cb284c5be4e86f1ed7a09e6.zip
(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'.")
597(defvar font-lock-mode-hook nil 597(defvar font-lock-mode-hook nil
598 "Function or functions to run on entry to Font Lock mode.") 598 "Function or functions to run on entry to Font Lock mode.")
599 599
600;; Originally these variable values were face names such as `bold' etc.
601;; Now we create our own faces, but we keep these variables for compatibility
602;; and they give users another mechanism for changing face appearance.
603;; We now allow a FACENAME in `font-lock-keywords' to be any expression that
604;; returns a face. So the easiest thing is to continue using these variables,
605;; rather than sometimes evaling FACENAME and sometimes not. sm.
606(defvar font-lock-comment-face 'font-lock-comment-face
607 "Face name to use for comments.")
608
609(defvar font-lock-string-face 'font-lock-string-face
610 "Face name to use for strings.")
611
612(defvar font-lock-keyword-face 'font-lock-keyword-face
613 "Face name to use for keywords.")
614
615(defvar font-lock-builtin-face 'font-lock-builtin-face
616 "Face name to use for builtins.")
617
618(defvar font-lock-function-name-face 'font-lock-function-name-face
619 "Face name to use for function names.")
620
621(defvar font-lock-variable-name-face 'font-lock-variable-name-face
622 "Face name to use for variable names.")
623
624(defvar font-lock-type-face 'font-lock-type-face
625 "Face name to use for type names.")
626
627(defvar font-lock-reference-face 'font-lock-reference-face
628 "Face name to use for reference names.")
629
630(defvar font-lock-warning-face 'font-lock-warning-face
631 "Face name to use for things that should stand out.")
632
600;; Font Lock mode. 633;; Font Lock mode.
601 634
602(eval-when-compile 635(eval-when-compile
@@ -803,6 +836,8 @@ see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types',
803 836
804(defvar font-lock-buffers nil) ; For remembering buffers. 837(defvar font-lock-buffers nil) ; For remembering buffers.
805 838
839(defvar global-font-lock-mode) ;Prevent warnings in defun below.
840
806;;;###autoload 841;;;###autoload
807(defun global-font-lock-mode (&optional arg message) 842(defun global-font-lock-mode (&optional arg message)
808 "Toggle Global Font Lock mode. 843 "Toggle Global Font Lock mode.
@@ -1581,38 +1616,7 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
1581 1616
1582;;; Colour etc. support. 1617;;; Colour etc. support.
1583 1618
1584;; Originally these variable values were face names such as `bold' etc. 1619(defvar font-lock-face-attributes) ;Avoid compiler warnings below.
1585;; Now we create our own faces, but we keep these variables for compatibility
1586;; and they give users another mechanism for changing face appearance.
1587;; We now allow a FACENAME in `font-lock-keywords' to be any expression that
1588;; returns a face. So the easiest thing is to continue using these variables,
1589;; rather than sometimes evaling FACENAME and sometimes not. sm.
1590(defvar font-lock-comment-face 'font-lock-comment-face
1591 "Face name to use for comments.")
1592
1593(defvar font-lock-string-face 'font-lock-string-face
1594 "Face name to use for strings.")
1595
1596(defvar font-lock-keyword-face 'font-lock-keyword-face
1597 "Face name to use for keywords.")
1598
1599(defvar font-lock-builtin-face 'font-lock-builtin-face
1600 "Face name to use for builtins.")
1601
1602(defvar font-lock-function-name-face 'font-lock-function-name-face
1603 "Face name to use for function names.")
1604
1605(defvar font-lock-variable-name-face 'font-lock-variable-name-face
1606 "Face name to use for variable names.")
1607
1608(defvar font-lock-type-face 'font-lock-type-face
1609 "Face name to use for type names.")
1610
1611(defvar font-lock-reference-face 'font-lock-reference-face
1612 "Face name to use for reference names.")
1613
1614(defvar font-lock-warning-face 'font-lock-warning-face
1615 "Face name to use for things that should stand out.")
1616 1620
1617;; Originally face attributes were specified via `font-lock-face-attributes'. 1621;; Originally face attributes were specified via `font-lock-face-attributes'.
1618;; Users then changed the default face attributes by setting that variable. 1622;; Users then changed the default face attributes by setting that variable.