+(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.
+ "\\(\\|-public\\|-method\\|-generic\\(-procedure\\)?\\)\\|"
+ ;; Macro names, as variable names. A bit dubious, this.
+ "\\(-syntax\\|-macro\\)\\|"
+ ;; Class names.
+ "-class"
+ ;; Guile modules.
+ "\\|-module"
+ "\\)\\)\\>"
+ ;; 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" "force"
+ ;; 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 `:' and `#:' 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.")
+