"*If non-nil, means show status messages for buffer fontification.
If a number, only buffers greater than this size have fontification messages."
:type '(choice (const :tag "never" nil)
- (const :tag "always" t)
- (integer :tag "size"))
+ (integer :tag "size")
+ (other :tag "always" t))
:group 'font-lock)
\f
;; Fontification variables:
;; Obsoleted by Emacs 20 parse-partial-sexp's COMMENTSTOP.
;(font-lock-comment-start-regexp . ";")
(font-lock-mark-block-function . mark-defun)))
- (scheme-mode-defaults
- '((scheme-font-lock-keywords
- scheme-font-lock-keywords-1 scheme-font-lock-keywords-2)
- nil t (("+-*/.<>=!?$%_&~^:" . "w")) beginning-of-defun
- ;; Obsoleted by Emacs 20 parse-partial-sexp's COMMENTSTOP.
- ;(font-lock-comment-start-regexp . ";")
- (font-lock-mark-block-function . mark-defun)))
;; For TeX modes we could use `backward-paragraph' for the same reason.
;; But we don't, because paragraph breaks are arguably likely enough to
;; occur within a genuine syntactic block to make it too risky.
(cons 'objc-mode objc-mode-defaults)
(cons 'java-mode java-mode-defaults)
(cons 'emacs-lisp-mode lisp-mode-defaults)
- (cons 'inferior-scheme-mode scheme-mode-defaults)
(cons 'latex-mode tex-mode-defaults)
(cons 'lisp-mode lisp-mode-defaults)
(cons 'lisp-interaction-mode lisp-mode-defaults)
(cons 'plain-tex-mode tex-mode-defaults)
- (cons 'scheme-mode scheme-mode-defaults)
- (cons 'scheme-interaction-mode scheme-mode-defaults)
(cons 'slitex-mode tex-mode-defaults)
(cons 'tex-mode tex-mode-defaults)))
"Alist of fall-back Font Lock defaults for major modes.
(radio :tag "Mode"
(const :tag "all" t)
(symbol :tag "name"))
- (radio :tag "Decoration"
+ (radio :tag "Support"
+ (const :tag "none" nil)
(const :tag "fast lock" fast-lock-mode)
(const :tag "lazy lock" lazy-lock-mode)))
))
"Face name to use for variable names.")
(defvar font-lock-type-face 'font-lock-type-face
- "Face name to use for type names.")
+ "Face name to use for type and class names.")
-(defvar font-lock-reference-face 'font-lock-reference-face
- "Face name to use for reference names.")
+(defvar font-lock-constant-face 'font-lock-constant-face
+ "Face name to use for constant and label names.")
(defvar font-lock-warning-face 'font-lock-warning-face
"Face name to use for things that should stand out.")
+(defvar font-lock-reference-face 'font-lock-constant-face
+ "This variable is obsolete. Use font-lock-constant-face.")
+
;; Originally face attributes were specified via `font-lock-face-attributes'.
;; Users then changed the default face attributes by setting that variable.
;; However, we try and be back-compatible and respect its value if set except
(((class color) (background light)) (:foreground "ForestGreen"))
(((class color) (background dark)) (:foreground "PaleGreen"))
(t (:bold t :underline t)))
- "Font Lock mode face used to highlight types."
+ "Font Lock mode face used to highlight type and classes."
:group 'font-lock-highlighting-faces)
-(defface font-lock-reference-face
+(defface font-lock-constant-face
'((((class grayscale) (background light))
(:foreground "LightGray" :bold t :underline t))
(((class grayscale) (background dark))
(((class color) (background light)) (:foreground "CadetBlue"))
(((class color) (background dark)) (:foreground "Aquamarine"))
(t (:bold t :underline t)))
- "Font Lock mode face used to highlight references."
+ "Font Lock mode face used to highlight constants and labels."
:group 'font-lock-highlighting-faces)
(defface font-lock-warning-face
;; Function declarations.
"\\(advice\\|alias\\|generic\\|macro\\*?\\|method\\|"
"setf\\|subst\\*?\\|un\\*?\\|"
- "ine-\\(derived-mode\\|function\\|"
- "skeleton\\|widget\\)\\)\\|"
+ "ine-\\(derived-mode\\|function\\|condition\\|"
+ "skeleton\\|widget\\|setf-expander\\|method-combination\\|"
+ "\\(symbol\\|compiler\\|modify\\)-macro\\)\\)\\|"
;; Variable declarations.
- "\\(const\\|custom\\|face\\|var\\)\\|"
+ "\\(const\\(ant\\)?\\|custom\\|face\\|var\\|parameter\\)\\|"
;; Structure declarations.
- "\\(class\\|group\\|struct\\|type\\)"
+ "\\(class\\|group\\|package\\|struct\\|type\\)"
"\\)\\)\\>"
;; Any whitespace and defined object.
"[ \t'\(]*"
"\\(\\sw+\\)?")
'(1 font-lock-keyword-face)
- '(7 (cond ((match-beginning 3) font-lock-function-name-face)
- ((match-beginning 5) font-lock-variable-name-face)
+ '(9 (cond ((match-beginning 3) font-lock-function-name-face)
+ ((match-beginning 6) font-lock-variable-name-face)
(t font-lock-type-face))
nil t))
;;
;; Emacs Lisp autoload cookies.
- '("^;;;\\(###\\)\\(autoload\\)\\>"
- (1 font-lock-reference-face prepend)
- (2 font-lock-warning-face prepend))
+ '("^;;;###\\(autoload\\)\\>" 1 font-lock-warning-face prepend)
))
"Subdued level highlighting for Lisp modes.")
"save-match-data" "save-current-buffer" "unwind-protect"
"condition-case" "track-mouse"
"eval-after-load" "eval-and-compile" "eval-when-compile"
- "eval-when"
+ "eval-when" "lambda"
"with-current-buffer" "with-electric-help"
"with-output-to-string" "with-output-to-temp-buffer"
"with-temp-buffer" "with-temp-file"
(cons (concat
"(" (regexp-opt
'("when" "unless" "case" "ecase" "typecase" "etypecase"
- "loop" "do" "do*" "dotimes" "dolist"
- "proclaim" "declaim" "declare"
- "lexical-let" "lexical-let*" "flet" "labels"
+ "ccase" "ctypecase" "handler-case" "handler-bind"
+ "restart-bind" "restart-case" "in-package"
+ "assert" "abort" "error" "cerror" "break" "ignore-errors"
+ "loop" "do" "do*" "dotimes" "dolist" "the" "locally"
+ "proclaim" "declaim" "declare" "symbol-macrolet"
+ "lexical-let" "lexical-let*" "flet" "labels" "compiler-let"
+ "destructuring-bind" "macrolet" "tagbody" "block"
"return" "return-from") t)
"\\>")
1)
;;
- ;; Feature symbols as references.
+ ;; Feature symbols as constants.
'("(\\(featurep\\|provide\\|require\\)\\>[ \t']*\\(\\sw+\\)?"
- (1 font-lock-keyword-face) (2 font-lock-reference-face nil t))
+ (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
;;
;; Words inside \\[] tend to be for `substitute-command-keys'.
- '("\\\\\\\\\\[\\(\\sw+\\)]" 1 font-lock-reference-face prepend)
+ '("\\\\\\\\\\[\\(\\sw+\\)]" 1 font-lock-constant-face prepend)
;;
;; Words inside `' tend to be symbol names.
- '("`\\(\\sw\\sw+\\)'" 1 font-lock-reference-face prepend)
+ '("`\\(\\sw\\sw+\\)'" 1 font-lock-constant-face prepend)
;;
;; Constant values.
'("\\<:\\sw\\sw+\\>" 0 font-lock-builtin-face)
(defvar lisp-font-lock-keywords lisp-font-lock-keywords-1
"Default expressions to highlight in Lisp modes.")
\f
-;; Scheme.
-
-(defconst scheme-font-lock-keywords-1
- (eval-when-compile
- (list
- ;;
- ;; Declarations. Hannes Haug <hannes.haug@student.uni-tuebingen.de> says
- ;; this works for SOS, STklos, SCOOPS, Meroon and Tiny CLOS.
- (list (concat "(\\(define\\("
- ;; Function names.
- "\\(\\|-method\\|-generic\\(-procedure\\)?\\)\\|"
- ;; Macro names, as variable names. A bit dubious, this.
- "\\(-syntax\\)\\|"
- ;; Class names.
- "-class"
- "\\)\\)\\>"
- ;; Any whitespace and declared object.
- "[ \t]*(?"
- "\\(\\sw+\\)?")
- '(1 font-lock-keyword-face)
- '(6 (cond ((match-beginning 3) font-lock-function-name-face)
- ((match-beginning 5) font-lock-variable-name-face)
- (t font-lock-type-face))
- nil t))
- ))
- "Subdued expressions to highlight in Scheme modes.")
-
-(defconst scheme-font-lock-keywords-2
- (append scheme-font-lock-keywords-1
- (eval-when-compile
- (list
- ;;
- ;; Control structures.
- (cons
- (concat
- "(" (regexp-opt
- '("begin" "call-with-current-continuation" "call/cc"
- "call-with-input-file" "call-with-output-file" "case" "cond"
- "do" "else" "for-each" "if" "lambda"
- "let" "let*" "let-syntax" "letrec" "letrec-syntax"
- ;; Hannes Haug <hannes.haug@student.uni-tuebingen.de> wants:
- "and" "or" "delay"
- ;; Stefan Monnier <stefan.monnier@epfl.ch> says don't bother:
- ;;"quasiquote" "quote" "unquote" "unquote-splicing"
- "map" "syntax" "syntax-rules") t)
- "\\>") 1)
- ;;
- ;; David Fox <fox@graphics.cs.nyu.edu> for SOS/STklos class specifiers.
- '("\\<<\\sw+>\\>" . font-lock-type-face)
- ;;
- ;; Scheme `:' keywords as builtins.
- '("\\<:\\sw+\\>" . font-lock-builtin-face)
- )))
- "Gaudy expressions to highlight in Scheme modes.")
-
-(defvar scheme-font-lock-keywords scheme-font-lock-keywords-1
- "Default expressions to highlight in Scheme modes.")
-\f
;; TeX.
;(defvar tex-font-lock-keywords
; '(("\\\\\\(begin\\|end\\|newcommand\\){\\([a-zA-Z0-9\\*]+\\)}"
; 2 font-lock-function-name-face)
; ("\\\\\\(cite\\|label\\|pageref\\|ref\\){\\([^} \t\n]+\\)}"
-; 2 font-lock-reference-face)
+; 2 font-lock-constant-face)
; ;; It seems a bit dubious to use `bold' and `italic' faces since we might
; ;; not be able to display those fonts.
; ("{\\\\bf\\([^}]+\\)}" 1 'bold keep)
; '(("\\\\\\(begin\\|end\\|newcommand\\){\\([a-zA-Z0-9\\*]+\\)}"
; 2 font-lock-function-name-face)
; ("\\\\\\(cite\\|label\\|pageref\\|ref\\){\\([^} \t\n]+\\)}"
-; 2 font-lock-reference-face)
+; 2 font-lock-constant-face)
; ("^[ \t]*\\\\def\\\\\\(\\(\\w\\|@\\)+\\)" 1 font-lock-function-name-face)
; "\\\\\\([a-zA-Z@]+\\|.\\)"
; ;; It seems a bit dubious to use `bold' and `italic' faces since we might
;; Citation args.
(list (concat slash citations arg)
(+ (regexp-opt-depth citations) arg-depth)
- 'font-lock-reference-face)
+ 'font-lock-constant-face)
(list (concat slash citations-opt opt arg)
(+ (regexp-opt-depth citations-opt) opt-depth arg-depth)
- 'font-lock-reference-face)
+ 'font-lock-constant-face)
;;
;; Command names, special and general.
(cons (concat slash specials) 'font-lock-warning-face)
(let* ((c-keywords
(eval-when-compile
(regexp-opt '("break" "continue" "do" "else" "for" "if" "return"
- "switch" "while") t)))
+ "switch" "while" "sizeof") t)))
(c-type-types
`(mapconcat 'identity
(cons
;;
;; Fontify case/goto keywords and targets, and case default/goto tags.
'("\\<\\(case\\|goto\\)\\>[ \t]*\\(-?\\sw+\\)?"
- (1 font-lock-keyword-face) (2 font-lock-reference-face nil t))
+ (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
;; Anders Lindgren <andersl@csd.uu.se> points out that it is quicker to use
;; MATCH-ANCHORED to effectively anchor the regexp on the left.
;; This must come after the one for keywords and targets.
'(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:"
(beginning-of-line) (end-of-line)
- (1 font-lock-reference-face)))
+ (1 font-lock-constant-face)))
)))
(setq c-font-lock-keywords-3
(cons
(,@ (eval-when-compile
(regexp-opt
- '("auto" "extern" "register" "static" "typedef" "struct"
+ '("extern" "auto" "register" "static" "typedef" "struct"
"union" "enum" "signed" "unsigned" "short" "long"
"int" "char" "float" "double" "void" "volatile" "const"
"inline" "friend" "bool" "virtual" "complex" "template"
"namespace" "using"
;; Mark Mitchell <mmitchell@usa.net> says these are new.
- "explicit" "mutable"))))
+ "explicit" "mutable"
+ ;; Branko Cibej <branko.cibej@hermes.si> suggests this.
+ "export"))))
c++-font-lock-extra-types)
"\\|"))
;;
(list
;;
;; Class names etc.
- (list (concat "\\<\\(class\\|public\\|private\\|protected\\)\\>[ \t]*"
+ (list (concat "\\<\\(class\\|public\\|private\\|protected\\|typename\\)\\>"
+ "[ \t]*"
"\\(" c++-type-spec "\\)?")
'(1 font-lock-type-face)
'(3 (if (match-beginning 6)
;;
;; Fontify case/goto keywords and targets, and case default/goto tags.
'("\\<\\(case\\|goto\\)\\>[ \t]*\\(-?\\sw+\\)?"
- (1 font-lock-keyword-face) (2 font-lock-reference-face nil t))
+ (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
;; This must come after the one for keywords and targets.
'(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:\\($\\|[^:]\\)"
(beginning-of-line) (end-of-line)
- (1 font-lock-reference-face)))
+ (1 font-lock-constant-face)))
;;
;; Fontify other builtin keywords.
(concat "\\<" c++-keywords "\\>")
;;
;; Eric Hopper <hopper@omnifarious.mn.org> says `true' and `false' are new.
- '("\\<\\(false\\|true\\)\\>" . font-lock-reference-face)
+ '("\\<\\(false\\|true\\)\\>" . font-lock-constant-face)
)))
(setq c++-font-lock-keywords-3
;;
;; Fontify case/goto keywords and targets, and case default/goto tags.
'("\\<\\(case\\|goto\\)\\>[ \t]*\\(-?\\sw+\\)?"
- (1 font-lock-keyword-face) (2 font-lock-reference-face nil t))
+ (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
;; Fontify tags iff sole statement on line, otherwise we detect selectors.
;; This must come after the one for keywords and targets.
'(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:[ \t]*$"
(beginning-of-line) (end-of-line)
- (1 font-lock-reference-face)))
+ (1 font-lock-constant-face)))
;;
;; Fontify null object pointers.
- '("\\<[Nn]il\\>" . font-lock-reference-face)
+ '("\\<[Nn]il\\>" . font-lock-constant-face)
)))
(setq objc-font-lock-keywords-3
;;
;; Fontify package names in import directives.
'("\\<\\(import\\|package\\)\\>[ \t]*\\(\\sw+\\)?"
- (1 font-lock-keyword-face) (2 font-lock-reference-face nil t))
+ (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
))
(setq java-font-lock-keywords-2
;;
;; Fontify keywords and targets, and case default/goto tags.
(list "\\<\\(break\\|case\\|continue\\|goto\\)\\>[ \t]*\\(-?\\sw+\\)?"
- '(1 font-lock-keyword-face) '(2 font-lock-reference-face nil t))
+ '(1 font-lock-keyword-face) '(2 font-lock-constant-face nil t))
;; This must come after the one for keywords and targets.
'(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:"
(beginning-of-line) (end-of-line)
- (1 font-lock-reference-face)))
+ (1 font-lock-constant-face)))
;;
;; Fontify keywords and types; the first can be followed by a type list.
(list (concat "\\<\\("
(1 font-lock-type-face)))
;;
;; Fontify all constants.
- '("\\<\\(false\\|null\\|true\\)\\>" . font-lock-reference-face)
+ '("\\<\\(false\\|null\\|true\\)\\>" . font-lock-constant-face)
;;
;; Javadoc tags within comments.
'("@\\(author\\|exception\\|return\\|see\\|version\\)\\>"
- (1 font-lock-reference-face prepend))
+ (1 font-lock-constant-face prepend))
'("@\\(param\\)\\>[ \t]*\\(\\sw+\\)?"
- (1 font-lock-reference-face prepend)
+ (1 font-lock-constant-face prepend)
(2 font-lock-variable-name-face prepend t))
)))