(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
;; o - '<> if the arglist is of angle bracket type;
;; o - 'arglist if it's some other arglist;
;; o - nil, if not in an arglist at all. This includes the
- ;; parenthesised condition which follows "if", "while", etc.
+ ;; parenthesized condition which follows "if", "while", etc.
context
;; The position of the next token after the closing paren of
;; the last detected cast.
;; Fontification".
(let* ((paren-state (c-parse-state))
(start (point))
+ (bod-lim (max (- (point) 500) (point-min)))
decl-context bo-decl in-typedef type-type ps-elt)
;; First, are we actually in a "local" declaration?
- (setq decl-context (c-beginning-of-decl-1)
+ (setq decl-context (c-beginning-of-decl-1 bod-lim)
bo-decl (point)
in-typedef (looking-at c-typedef-key))
(if in-typedef (c-forward-token-2))