+(defconst lisp-font-lock-keywords-2
+ (append lisp-font-lock-keywords-1
+ (eval-when-compile
+ (list
+ ;;
+ ;; Control structures. Emacs Lisp forms.
+ (cons (concat
+ "(" (regexp-opt
+ '("cond" "if" "while" "catch" "throw" "let" "let*"
+ "prog" "progn" "progv" "prog1" "prog2" "prog*"
+ "inline" "save-restriction" "save-excursion"
+ "save-window-excursion" "save-selected-window"
+ "save-match-data" "save-current-buffer" "unwind-protect"
+ "condition-case" "track-mouse"
+ "eval-after-load" "eval-and-compile" "eval-when-compile"
+ "eval-when" "lambda"
+ "with-current-buffer" "with-electric-help"
+ "with-output-to-string" "with-output-to-temp-buffer"
+ "with-temp-buffer" "with-temp-file"
+ "with-timeout") t)
+ "\\>")
+ 1)
+ ;;
+ ;; Control structures. Common Lisp forms.
+ (cons (concat
+ "(" (regexp-opt
+ '("when" "unless" "case" "ecase" "typecase" "etypecase"
+ "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 constants.
+ '("(\\(featurep\\|provide\\|require\\)\\>[ \t']*\\(\\sw+\\)?"
+ (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-constant-face prepend)
+ ;;
+ ;; Words inside `' tend to be symbol names.
+ '("`\\(\\sw\\sw+\\)'" 1 font-lock-constant-face prepend)
+ ;;
+ ;; Constant values.
+ '("\\<:\\sw\\sw+\\>" 0 font-lock-builtin-face)
+ ;;
+ ;; ELisp and CLisp `&' keywords as types.
+ '("\\<\\&\\sw+\\>" . font-lock-type-face)
+ )))
+ "Gaudy level highlighting for Lisp modes.")
+
+(defvar lisp-font-lock-keywords lisp-font-lock-keywords-1
+ "Default expressions to highlight in Lisp modes.")
+\f
+;; TeX.
+
+;(defvar tex-font-lock-keywords
+; ;; Regexps updated with help from Ulrik Dickow <dickow@nbi.dk>.
+; '(("\\\\\\(begin\\|end\\|newcommand\\){\\([a-zA-Z0-9\\*]+\\)}"
+; 2 font-lock-function-name-face)
+; ("\\\\\\(cite\\|label\\|pageref\\|ref\\){\\([^} \t\n]+\\)}"
+; 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)
+; ("{\\\\\\(em\\|it\\|sl\\)\\([^}]+\\)}" 2 'italic keep)
+; ("\\\\\\([a-zA-Z@]+\\|.\\)" . font-lock-keyword-face)
+; ("^[ \t\n]*\\\\def[\\\\@]\\(\\w+\\)" 1 font-lock-function-name-face keep))
+; ;; Rewritten and extended for LaTeX2e by Ulrik Dickow <dickow@nbi.dk>.
+; '(("\\\\\\(begin\\|end\\|newcommand\\){\\([a-zA-Z0-9\\*]+\\)}"
+; 2 font-lock-function-name-face)
+; ("\\\\\\(cite\\|label\\|pageref\\|ref\\){\\([^} \t\n]+\\)}"
+; 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
+; ;; not be able to display those fonts.
+; ;; LaTeX2e: \emph{This is emphasized}.
+; ("\\\\emph{\\([^}]+\\)}" 1 'italic keep)
+; ;; LaTeX2e: \textbf{This is bold}, \textit{...}, \textsl{...}
+; ("\\\\text\\(\\(bf\\)\\|it\\|sl\\){\\([^}]+\\)}"
+; 3 (if (match-beginning 2) 'bold 'italic) keep)
+; ;; Old-style bf/em/it/sl. Stop at `\\' and un-escaped `&', for tables.
+; ("\\\\\\(\\(bf\\)\\|em\\|it\\|sl\\)\\>\\(\\([^}&\\]\\|\\\\[^\\]\\)+\\)"
+; 3 (if (match-beginning 2) 'bold 'italic) keep))
+
+;; Rewritten with the help of Alexandra Bac <abac@welcome.disi.unige.it>.
+(defconst tex-font-lock-keywords-1
+ (eval-when-compile
+ (let* (;;
+ ;; Names of commands whose arg should be fontified as heading, etc.
+ (headings (regexp-opt '("title" "begin" "end") t))
+ ;; These commands have optional args.
+ (headings-opt (regexp-opt
+ '("chapter" "part"
+ "section" "subsection" "subsubsection"
+ "section*" "subsection*" "subsubsection*"
+ "paragraph" "subparagraph" "subsubparagraph"
+ "paragraph*" "subparagraph*" "subsubparagraph*"
+ "newcommand" "renewcommand" "newenvironment"
+ "newtheorem"
+ "newcommand*" "renewcommand*" "newenvironment*"
+ "newtheorem*")
+ t))
+ (variables (regexp-opt
+ '("newcounter" "newcounter*" "setcounter" "addtocounter"
+ "setlength" "addtolength" "settowidth")
+ t))
+ (includes (regexp-opt
+ '("input" "include" "includeonly" "bibliography"
+ "epsfig" "psfig" "epsf")
+ t))
+ (includes-opt (regexp-opt
+ '("nofiles" "usepackage"
+ "includegraphics" "includegraphics*")
+ t))
+ ;; Miscellany.
+ (slash "\\\\")
+ (opt "\\(\\[[^]]*\\]\\)?")
+ (arg "{\\([^}]+\\)")
+ (opt-depth (regexp-opt-depth opt))
+ (arg-depth (regexp-opt-depth arg))
+ )
+ (list
+ ;;
+ ;; Heading args.
+ (list (concat slash headings arg)
+ (+ (regexp-opt-depth headings) arg-depth)
+ 'font-lock-function-name-face)
+ (list (concat slash headings-opt opt arg)
+ (+ (regexp-opt-depth headings-opt) opt-depth arg-depth)
+ 'font-lock-function-name-face)
+ ;;
+ ;; Variable args.
+ (list (concat slash variables arg)
+ (+ (regexp-opt-depth variables) arg-depth)
+ 'font-lock-variable-name-face)
+ ;;
+ ;; Include args.
+ (list (concat slash includes arg)
+ (+ (regexp-opt-depth includes) arg-depth)
+ 'font-lock-builtin-face)
+ (list (concat slash includes-opt opt arg)
+ (+ (regexp-opt-depth includes-opt) opt-depth arg-depth)
+ 'font-lock-builtin-face)
+ ;;
+ ;; Definitions. I think.
+ '("^[ \t]*\\\\def\\\\\\(\\(\\w\\|@\\)+\\)"
+ 1 font-lock-function-name-face)
+ )))
+ "Subdued expressions to highlight in TeX modes.")
+
+(defconst tex-font-lock-keywords-2
+ (append tex-font-lock-keywords-1
+ (eval-when-compile
+ (let* (;;
+ ;; Names of commands whose arg should be fontified with fonts.
+ (bold (regexp-opt '("bf" "textbf" "textsc" "textup"
+ "boldsymbol" "pmb") t))
+ (italic (regexp-opt '("it" "textit" "textsl" "emph") t))
+ (type (regexp-opt '("texttt" "textmd" "textrm" "textsf") t))
+ ;;
+ ;; Names of commands whose arg should be fontified as a citation.
+ (citations (regexp-opt
+ '("label" "ref" "pageref" "vref" "eqref")
+ t))
+ (citations-opt (regexp-opt
+ '("cite" "caption" "index" "glossary"
+ "footnote" "footnotemark" "footnotetext")
+ t))
+ ;;
+ ;; Names of commands that should be fontified.
+ (specials (regexp-opt
+ '("\\"
+ "linebreak" "nolinebreak" "pagebreak" "nopagebreak"
+ "newline" "newpage" "clearpage" "cleardoublepage"
+ "displaybreak" "allowdisplaybreaks" "enlargethispage")
+ t))
+ (general "\\([a-zA-Z@]+\\**\\|[^ \t\n]\\)")
+ ;;
+ ;; Miscellany.
+ (slash "\\\\")
+ (opt "\\(\\[[^]]*\\]\\)?")
+ (arg "{\\([^}]+\\)")
+ (opt-depth (regexp-opt-depth opt))
+ (arg-depth (regexp-opt-depth arg))
+ )
+ (list
+ ;;
+ ;; Citation args.
+ (list (concat slash citations arg)
+ (+ (regexp-opt-depth citations) arg-depth)
+ 'font-lock-constant-face)
+ (list (concat slash citations-opt opt arg)
+ (+ (regexp-opt-depth citations-opt) opt-depth arg-depth)
+ 'font-lock-constant-face)
+ ;;
+ ;; Command names, special and general.
+ (cons (concat slash specials) 'font-lock-warning-face)
+ (concat slash general)
+ ;;
+ ;; Font environments. It seems a bit dubious to use `bold' etc. faces
+ ;; since we might not be able to display those fonts.
+ (list (concat slash bold arg)
+ (+ (regexp-opt-depth bold) arg-depth)
+ '(quote bold) 'keep)
+ (list (concat slash italic arg)
+ (+ (regexp-opt-depth italic) arg-depth)
+ '(quote italic) 'keep)
+ (list (concat slash type arg)
+ (+ (regexp-opt-depth type) arg-depth)
+ '(quote bold-italic) 'keep)
+ ;;
+ ;; Old-style bf/em/it/sl. Stop at `\\' and un-escaped `&', for tables.
+ (list (concat "\\\\\\(\\(bf\\)\\|em\\|it\\|sl\\)\\>"
+ "\\(\\([^}&\\]\\|\\\\[^\\]\\)+\\)")
+ 3 '(if (match-beginning 2) 'bold 'italic) 'keep)
+ ))))
+ "Gaudy expressions to highlight in TeX modes.")
+
+(defvar tex-font-lock-keywords tex-font-lock-keywords-1
+ "Default expressions to highlight in TeX modes.")
+\f
+;;; User choices.
+
+;; These provide a means to fontify types not defined by the language. Those
+;; types might be the user's own or they might be generally accepted and used.
+;; Generally accepted types are used to provide default variable values.
+
+(define-widget 'font-lock-extra-types-widget 'radio
+ "Widget `:type' for members of the custom group `font-lock-extra-types'.
+Members should `:load' the package `font-lock' to use this widget."
+ :args '((const :tag "none" nil)
+ (repeat :tag "types" regexp)))
+
+(defcustom c-font-lock-extra-types '("FILE" "\\sw+_t")
+ "*List of extra types to fontify in C mode.
+Each list item should be a regexp not containing word-delimiters.
+For example, a value of (\"FILE\" \"\\\\sw+_t\") means the word FILE and words
+ending in _t are treated as type names.
+
+The value of this variable is used when Font Lock mode is turned on."
+ :type 'font-lock-extra-types-widget
+ :group 'font-lock-extra-types)
+
+(defcustom c++-font-lock-extra-types
+ '("\\([iof]\\|str\\)+stream\\(buf\\)?" "ios"
+ "string" "rope"
+ "list" "slist"
+ "deque" "vector" "bit_vector"
+ "set" "multiset"
+ "map" "multimap"
+ "hash\\(_\\(m\\(ap\\|ulti\\(map\\|set\\)\\)\\|set\\)\\)?"
+ "stack" "queue" "priority_queue"
+ "iterator" "const_iterator" "reverse_iterator" "const_reverse_iterator")
+ "*List of extra types to fontify in C++ mode.
+Each list item should be a regexp not containing word-delimiters.
+For example, a value of (\"string\") means the word string is treated as a type
+name.
+
+The value of this variable is used when Font Lock mode is turned on."
+ :type 'font-lock-extra-types-widget
+ :group 'font-lock-extra-types)
+
+(defcustom objc-font-lock-extra-types '("Class" "BOOL" "IMP" "SEL")
+ "*List of extra types to fontify in Objective-C mode.
+Each list item should be a regexp not containing word-delimiters.
+For example, a value of (\"Class\" \"BOOL\" \"IMP\" \"SEL\") means the words
+Class, BOOL, IMP and SEL are treated as type names.
+
+The value of this variable is used when Font Lock mode is turned on."
+ :type 'font-lock-extra-types-widget
+ :group 'font-lock-extra-types)
+
+(defcustom java-font-lock-extra-types '("[A-Z\300-\326\330-\337]\\sw+")
+ "*List of extra types to fontify in Java mode.
+Each list item should be a regexp not containing word-delimiters.
+For example, a value of (\"[A-Z\300-\326\330-\337]\\\\sw+\") means capitalised
+words (and words conforming to the Java id spec) are treated as type names.
+
+The value of this variable is used when Font Lock mode is turned on."
+ :type 'font-lock-extra-types-widget
+ :group 'font-lock-extra-types)
+\f
+;;; C.
+
+;; [Murmur murmur murmur] Maestro, drum-roll please... [Murmur murmur murmur.]
+;; Ahem. [Murmur murmur murmur] Lay-dees an Gennel-men. [Murmur murmur shhh!]
+;; I am most proud and humbly honoured today [murmur murmur cough] to present
+;; to you good people, the winner of the Second Millennium Award for The Most
+;; Hairy Language Syntax. [Ahhh!] All rise please. [Shuffle shuffle
+;; shuffle.] And a round of applause please. For... The C Language! [Roar.]
+;;
+;; Thank you... You are too kind... It is with a feeling of great privilege
+;; and indeed emotion [sob] that I accept this award. It has been a long hard
+;; road. But we know our destiny. And our future. For we must not rest.
+;; There are more tokens to overload, more shoehorn, more methodologies. But
+;; more is a plus! [Ha ha ha.] And more means plus! [Ho ho ho.] The future
+;; is C++! [Ohhh!] The Third Millennium Award... Will be ours! [Roar.]