summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-fonts.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/cc-fonts.el')
-rw-r--r--lisp/progmodes/cc-fonts.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index a5a9582315b..ac4d1bf9e57 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -194,9 +194,13 @@
(unless (face-property-instance oldface 'reverse)
(invert-face newface)))))
-(defvar c-annotation-face (make-face 'c-annotation-face)
- "Face used to highlight annotations in java-mode and other modes that may wish to use it.")
-(set-face-foreground 'c-annotation-face "blue")
+(defvar c-annotation-face 'c-annotation-face)
+
+(defface c-annotation-face
+ '((default :inherit font-lock-constant-face))
+ "Face for highlighting annotations in Java mode and similar modes."
+ :version "24.1"
+ :group 'c)
(eval-and-compile
;; We need the following definitions during compilation since they're
@@ -1040,7 +1044,7 @@ casts and declarations are fontified. Used on level 2 and higher."
;; Inside the following "condition form", we move forward over the
;; declarator's identifier up as far as any opening bracket (for array
;; size) or paren (for parameters of function-type) or brace (for
- ;; array/struct initialisation) or "=" or terminating delimiter
+ ;; array/struct initialization) or "=" or terminating delimiter
;; (e.g. "," or ";" or "}").
(and
pos
@@ -1122,7 +1126,7 @@ casts and declarations are fontified. Used on level 2 and higher."
(char-after (match-beginning 1))))
(if types
- ;; Register and fontify the identifer as a type.
+ ;; Register and fontify the identifier as a type.
(let ((c-promote-possible-types t))
(goto-char id-start)
(c-forward-type))