aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Marshall1998-02-20 14:24:57 +0000
committerSimon Marshall1998-02-20 14:24:57 +0000
commit8acf2292d9a7f7fc0f326a6186423d087f5a7f30 (patch)
tree88282bed5054f2f063f231a90b2444a8ac3ae6cf
parent2e38d8620a9b6fba358311d1be9eb29decbd81d6 (diff)
downloademacs-8acf2292d9a7f7fc0f326a6186423d087f5a7f30.tar.gz
emacs-8acf2292d9a7f7fc0f326a6186423d087f5a7f30.zip
Renamed font-lock-reference-face to font-lock-constant-face.
-rw-r--r--lisp/font-lock.el63
1 files changed, 32 insertions, 31 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index ea593fb2bf3..93ec4c69791 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1638,14 +1638,17 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
1638 "Face name to use for variable names.") 1638 "Face name to use for variable names.")
1639 1639
1640(defvar font-lock-type-face 'font-lock-type-face 1640(defvar font-lock-type-face 'font-lock-type-face
1641 "Face name to use for type names.") 1641 "Face name to use for type and class names.")
1642 1642
1643(defvar font-lock-reference-face 'font-lock-reference-face 1643(defvar font-lock-constant-face 'font-lock-constant-face
1644 "Face name to use for reference names.") 1644 "Face name to use for constant and label names.")
1645 1645
1646(defvar font-lock-warning-face 'font-lock-warning-face 1646(defvar font-lock-warning-face 'font-lock-warning-face
1647 "Face name to use for things that should stand out.") 1647 "Face name to use for things that should stand out.")
1648 1648
1649(defvar font-lock-reference-face 'font-lock-constant-face
1650 "This variable is obsolete. Use font-lock-constant-face.")
1651
1649;; Originally face attributes were specified via `font-lock-face-attributes'. 1652;; Originally face attributes were specified via `font-lock-face-attributes'.
1650;; Users then changed the default face attributes by setting that variable. 1653;; Users then changed the default face attributes by setting that variable.
1651;; However, we try and be back-compatible and respect its value if set except 1654;; However, we try and be back-compatible and respect its value if set except
@@ -1739,10 +1742,10 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
1739 (((class color) (background light)) (:foreground "ForestGreen")) 1742 (((class color) (background light)) (:foreground "ForestGreen"))
1740 (((class color) (background dark)) (:foreground "PaleGreen")) 1743 (((class color) (background dark)) (:foreground "PaleGreen"))
1741 (t (:bold t :underline t))) 1744 (t (:bold t :underline t)))
1742 "Font Lock mode face used to highlight types." 1745 "Font Lock mode face used to highlight type and classes."
1743 :group 'font-lock-highlighting-faces) 1746 :group 'font-lock-highlighting-faces)
1744 1747
1745(defface font-lock-reference-face 1748(defface font-lock-constant-face
1746 '((((class grayscale) (background light)) 1749 '((((class grayscale) (background light))
1747 (:foreground "LightGray" :bold t :underline t)) 1750 (:foreground "LightGray" :bold t :underline t))
1748 (((class grayscale) (background dark)) 1751 (((class grayscale) (background dark))
@@ -1750,7 +1753,7 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
1750 (((class color) (background light)) (:foreground "CadetBlue")) 1753 (((class color) (background light)) (:foreground "CadetBlue"))
1751 (((class color) (background dark)) (:foreground "Aquamarine")) 1754 (((class color) (background dark)) (:foreground "Aquamarine"))
1752 (t (:bold t :underline t))) 1755 (t (:bold t :underline t)))
1753 "Font Lock mode face used to highlight references." 1756 "Font Lock mode face used to highlight constants and labels."
1754 :group 'font-lock-highlighting-faces) 1757 :group 'font-lock-highlighting-faces)
1755 1758
1756(defface font-lock-warning-face 1759(defface font-lock-warning-face
@@ -1932,9 +1935,7 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item."
1932 nil t)) 1935 nil t))
1933 ;; 1936 ;;
1934 ;; Emacs Lisp autoload cookies. 1937 ;; Emacs Lisp autoload cookies.
1935 '("^;;;\\(###\\)\\(autoload\\)\\>" 1938 '("^;;;###\\(autoload\\)\\>" 1 font-lock-warning-face prepend)
1936 (1 font-lock-reference-face prepend)
1937 (2 font-lock-warning-face prepend))
1938 )) 1939 ))
1939 "Subdued level highlighting for Lisp modes.") 1940 "Subdued level highlighting for Lisp modes.")
1940 1941
@@ -1972,15 +1973,15 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item."
1972 "\\>") 1973 "\\>")
1973 1) 1974 1)
1974 ;; 1975 ;;
1975 ;; Feature symbols as references. 1976 ;; Feature symbols as constants.
1976 '("(\\(featurep\\|provide\\|require\\)\\>[ \t']*\\(\\sw+\\)?" 1977 '("(\\(featurep\\|provide\\|require\\)\\>[ \t']*\\(\\sw+\\)?"
1977 (1 font-lock-keyword-face) (2 font-lock-reference-face nil t)) 1978 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
1978 ;; 1979 ;;
1979 ;; Words inside \\[] tend to be for `substitute-command-keys'. 1980 ;; Words inside \\[] tend to be for `substitute-command-keys'.
1980 '("\\\\\\\\\\[\\(\\sw+\\)]" 1 font-lock-reference-face prepend) 1981 '("\\\\\\\\\\[\\(\\sw+\\)]" 1 font-lock-constant-face prepend)
1981 ;; 1982 ;;
1982 ;; Words inside `' tend to be symbol names. 1983 ;; Words inside `' tend to be symbol names.
1983 '("`\\(\\sw\\sw+\\)'" 1 font-lock-reference-face prepend) 1984 '("`\\(\\sw\\sw+\\)'" 1 font-lock-constant-face prepend)
1984 ;; 1985 ;;
1985 ;; Constant values. 1986 ;; Constant values.
1986 '("\\<:\\sw\\sw+\\>" 0 font-lock-builtin-face) 1987 '("\\<:\\sw\\sw+\\>" 0 font-lock-builtin-face)
@@ -2058,7 +2059,7 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item."
2058; '(("\\\\\\(begin\\|end\\|newcommand\\){\\([a-zA-Z0-9\\*]+\\)}" 2059; '(("\\\\\\(begin\\|end\\|newcommand\\){\\([a-zA-Z0-9\\*]+\\)}"
2059; 2 font-lock-function-name-face) 2060; 2 font-lock-function-name-face)
2060; ("\\\\\\(cite\\|label\\|pageref\\|ref\\){\\([^} \t\n]+\\)}" 2061; ("\\\\\\(cite\\|label\\|pageref\\|ref\\){\\([^} \t\n]+\\)}"
2061; 2 font-lock-reference-face) 2062; 2 font-lock-constant-face)
2062; ;; It seems a bit dubious to use `bold' and `italic' faces since we might 2063; ;; It seems a bit dubious to use `bold' and `italic' faces since we might
2063; ;; not be able to display those fonts. 2064; ;; not be able to display those fonts.
2064; ("{\\\\bf\\([^}]+\\)}" 1 'bold keep) 2065; ("{\\\\bf\\([^}]+\\)}" 1 'bold keep)
@@ -2069,7 +2070,7 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item."
2069; '(("\\\\\\(begin\\|end\\|newcommand\\){\\([a-zA-Z0-9\\*]+\\)}" 2070; '(("\\\\\\(begin\\|end\\|newcommand\\){\\([a-zA-Z0-9\\*]+\\)}"
2070; 2 font-lock-function-name-face) 2071; 2 font-lock-function-name-face)
2071; ("\\\\\\(cite\\|label\\|pageref\\|ref\\){\\([^} \t\n]+\\)}" 2072; ("\\\\\\(cite\\|label\\|pageref\\|ref\\){\\([^} \t\n]+\\)}"
2072; 2 font-lock-reference-face) 2073; 2 font-lock-constant-face)
2073; ("^[ \t]*\\\\def\\\\\\(\\(\\w\\|@\\)+\\)" 1 font-lock-function-name-face) 2074; ("^[ \t]*\\\\def\\\\\\(\\(\\w\\|@\\)+\\)" 1 font-lock-function-name-face)
2074; "\\\\\\([a-zA-Z@]+\\|.\\)" 2075; "\\\\\\([a-zA-Z@]+\\|.\\)"
2075; ;; It seems a bit dubious to use `bold' and `italic' faces since we might 2076; ;; It seems a bit dubious to use `bold' and `italic' faces since we might
@@ -2189,10 +2190,10 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item."
2189 ;; Citation args. 2190 ;; Citation args.
2190 (list (concat slash citations arg) 2191 (list (concat slash citations arg)
2191 (+ (regexp-opt-depth citations) arg-depth) 2192 (+ (regexp-opt-depth citations) arg-depth)
2192 'font-lock-reference-face) 2193 'font-lock-constant-face)
2193 (list (concat slash citations-opt opt arg) 2194 (list (concat slash citations-opt opt arg)
2194 (+ (regexp-opt-depth citations-opt) opt-depth arg-depth) 2195 (+ (regexp-opt-depth citations-opt) opt-depth arg-depth)
2195 'font-lock-reference-face) 2196 'font-lock-constant-face)
2196 ;; 2197 ;;
2197 ;; Command names, special and general. 2198 ;; Command names, special and general.
2198 (cons (concat slash specials) 'font-lock-warning-face) 2199 (cons (concat slash specials) 'font-lock-warning-face)
@@ -2368,13 +2369,13 @@ See also `c-font-lock-extra-types'.")
2368 ;; 2369 ;;
2369 ;; Fontify case/goto keywords and targets, and case default/goto tags. 2370 ;; Fontify case/goto keywords and targets, and case default/goto tags.
2370 '("\\<\\(case\\|goto\\)\\>[ \t]*\\(-?\\sw+\\)?" 2371 '("\\<\\(case\\|goto\\)\\>[ \t]*\\(-?\\sw+\\)?"
2371 (1 font-lock-keyword-face) (2 font-lock-reference-face nil t)) 2372 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
2372 ;; Anders Lindgren <andersl@csd.uu.se> points out that it is quicker to use 2373 ;; Anders Lindgren <andersl@csd.uu.se> points out that it is quicker to use
2373 ;; MATCH-ANCHORED to effectively anchor the regexp on the left. 2374 ;; MATCH-ANCHORED to effectively anchor the regexp on the left.
2374 ;; This must come after the one for keywords and targets. 2375 ;; This must come after the one for keywords and targets.
2375 '(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:" 2376 '(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:"
2376 (beginning-of-line) (end-of-line) 2377 (beginning-of-line) (end-of-line)
2377 (1 font-lock-reference-face))) 2378 (1 font-lock-constant-face)))
2378 ))) 2379 )))
2379 2380
2380 (setq c-font-lock-keywords-3 2381 (setq c-font-lock-keywords-3
@@ -2551,17 +2552,17 @@ See also `c++-font-lock-extra-types'.")
2551 ;; 2552 ;;
2552 ;; Fontify case/goto keywords and targets, and case default/goto tags. 2553 ;; Fontify case/goto keywords and targets, and case default/goto tags.
2553 '("\\<\\(case\\|goto\\)\\>[ \t]*\\(-?\\sw+\\)?" 2554 '("\\<\\(case\\|goto\\)\\>[ \t]*\\(-?\\sw+\\)?"
2554 (1 font-lock-keyword-face) (2 font-lock-reference-face nil t)) 2555 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
2555 ;; This must come after the one for keywords and targets. 2556 ;; This must come after the one for keywords and targets.
2556 '(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:\\($\\|[^:]\\)" 2557 '(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:\\($\\|[^:]\\)"
2557 (beginning-of-line) (end-of-line) 2558 (beginning-of-line) (end-of-line)
2558 (1 font-lock-reference-face))) 2559 (1 font-lock-constant-face)))
2559 ;; 2560 ;;
2560 ;; Fontify other builtin keywords. 2561 ;; Fontify other builtin keywords.
2561 (concat "\\<" c++-keywords "\\>") 2562 (concat "\\<" c++-keywords "\\>")
2562 ;; 2563 ;;
2563 ;; Eric Hopper <hopper@omnifarious.mn.org> says `true' and `false' are new. 2564 ;; Eric Hopper <hopper@omnifarious.mn.org> says `true' and `false' are new.
2564 '("\\<\\(false\\|true\\)\\>" . font-lock-reference-face) 2565 '("\\<\\(false\\|true\\)\\>" . font-lock-constant-face)
2565 ))) 2566 )))
2566 2567
2567 (setq c++-font-lock-keywords-3 2568 (setq c++-font-lock-keywords-3
@@ -2700,15 +2701,15 @@ See also `objc-font-lock-extra-types'.")
2700 ;; 2701 ;;
2701 ;; Fontify case/goto keywords and targets, and case default/goto tags. 2702 ;; Fontify case/goto keywords and targets, and case default/goto tags.
2702 '("\\<\\(case\\|goto\\)\\>[ \t]*\\(-?\\sw+\\)?" 2703 '("\\<\\(case\\|goto\\)\\>[ \t]*\\(-?\\sw+\\)?"
2703 (1 font-lock-keyword-face) (2 font-lock-reference-face nil t)) 2704 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
2704 ;; Fontify tags iff sole statement on line, otherwise we detect selectors. 2705 ;; Fontify tags iff sole statement on line, otherwise we detect selectors.
2705 ;; This must come after the one for keywords and targets. 2706 ;; This must come after the one for keywords and targets.
2706 '(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:[ \t]*$" 2707 '(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:[ \t]*$"
2707 (beginning-of-line) (end-of-line) 2708 (beginning-of-line) (end-of-line)
2708 (1 font-lock-reference-face))) 2709 (1 font-lock-constant-face)))
2709 ;; 2710 ;;
2710 ;; Fontify null object pointers. 2711 ;; Fontify null object pointers.
2711 '("\\<[Nn]il\\>" . font-lock-reference-face) 2712 '("\\<[Nn]il\\>" . font-lock-constant-face)
2712 ))) 2713 )))
2713 2714
2714 (setq objc-font-lock-keywords-3 2715 (setq objc-font-lock-keywords-3
@@ -2812,7 +2813,7 @@ See also `java-font-lock-extra-types'.")
2812 ;; 2813 ;;
2813 ;; Fontify package names in import directives. 2814 ;; Fontify package names in import directives.
2814 '("\\<\\(import\\|package\\)\\>[ \t]*\\(\\sw+\\)?" 2815 '("\\<\\(import\\|package\\)\\>[ \t]*\\(\\sw+\\)?"
2815 (1 font-lock-keyword-face) (2 font-lock-reference-face nil t)) 2816 (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
2816 )) 2817 ))
2817 2818
2818 (setq java-font-lock-keywords-2 2819 (setq java-font-lock-keywords-2
@@ -2828,11 +2829,11 @@ See also `java-font-lock-extra-types'.")
2828 ;; 2829 ;;
2829 ;; Fontify keywords and targets, and case default/goto tags. 2830 ;; Fontify keywords and targets, and case default/goto tags.
2830 (list "\\<\\(break\\|case\\|continue\\|goto\\)\\>[ \t]*\\(-?\\sw+\\)?" 2831 (list "\\<\\(break\\|case\\|continue\\|goto\\)\\>[ \t]*\\(-?\\sw+\\)?"
2831 '(1 font-lock-keyword-face) '(2 font-lock-reference-face nil t)) 2832 '(1 font-lock-keyword-face) '(2 font-lock-constant-face nil t))
2832 ;; This must come after the one for keywords and targets. 2833 ;; This must come after the one for keywords and targets.
2833 '(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:" 2834 '(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:"
2834 (beginning-of-line) (end-of-line) 2835 (beginning-of-line) (end-of-line)
2835 (1 font-lock-reference-face))) 2836 (1 font-lock-constant-face)))
2836 ;; 2837 ;;
2837 ;; Fontify keywords and types; the first can be followed by a type list. 2838 ;; Fontify keywords and types; the first can be followed by a type list.
2838 (list (concat "\\<\\(" 2839 (list (concat "\\<\\("
@@ -2845,13 +2846,13 @@ See also `java-font-lock-extra-types'.")
2845 (1 font-lock-type-face))) 2846 (1 font-lock-type-face)))
2846 ;; 2847 ;;
2847 ;; Fontify all constants. 2848 ;; Fontify all constants.
2848 '("\\<\\(false\\|null\\|true\\)\\>" . font-lock-reference-face) 2849 '("\\<\\(false\\|null\\|true\\)\\>" . font-lock-constant-face)
2849 ;; 2850 ;;
2850 ;; Javadoc tags within comments. 2851 ;; Javadoc tags within comments.
2851 '("@\\(author\\|exception\\|return\\|see\\|version\\)\\>" 2852 '("@\\(author\\|exception\\|return\\|see\\|version\\)\\>"
2852 (1 font-lock-reference-face prepend)) 2853 (1 font-lock-constant-face prepend))
2853 '("@\\(param\\)\\>[ \t]*\\(\\sw+\\)?" 2854 '("@\\(param\\)\\>[ \t]*\\(\\sw+\\)?"
2854 (1 font-lock-reference-face prepend) 2855 (1 font-lock-constant-face prepend)
2855 (2 font-lock-variable-name-face prepend t)) 2856 (2 font-lock-variable-name-face prepend t))
2856 ))) 2857 )))
2857 2858