=== modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-12-03 17:23:42 +0000 +++ lisp/ChangeLog 2012-12-03 19:55:20 +0000 @@ -1,3 +1,12 @@ +2012-12-03 Vincent Belaïche + + * progmodes/cc-fonts.el (c-basic-matchers-before): Use new lang + constant `c-builtin-kwds' for handling language specific keyword + fontification. + + * progmodes/cc-langs.el (c-builtin-kwds): New lang constant for + handling language specific keyword fontification. + 2012-12-03 Agustín Martín Domingo * textmodes/ispell.el (ispell-init-process) === modified file 'lisp/progmodes/cc-langs.el' --- lisp/progmodes/cc-langs.el 2012-09-13 18:41:21 +0000 +++ lisp/progmodes/cc-langs.el 2012-12-03 17:24:59 +0000 @@ -649,6 +649,15 @@ (prefix "::") (left-assoc "."))) +(c-lang-defconst c-builtin-kwds + "Keywords for builtin keywords constants." + ;; This is for functions that are not part of a library but builtin in the + ;; language. AWK mode does not use this constant but could have done + ;; so. Currently this is used only as a hook for languages not yes part of + ;; cc-xxx progmode, like DXL. + t nil + ) + (c-lang-defconst c-opt-identifier-concat-key ;; Appendable adorned regexp matching the operators that join ;; symbols to fully qualified identifiers, or nil in languages that === modified file 'lisp/progmodes/cc-fonts.el' --- lisp/progmodes/cc-fonts.el 2012-01-19 07:21:25 +0000 +++ lisp/progmodes/cc-fonts.el 2012-12-03 17:26:28 +0000 @@ -763,6 +763,12 @@ `((eval . (list ,(concat "\\<\\(" re "\\)\\>") 1 c-constant-face-name)))))) + ;; Fontify builtins keyword constants. + ,@(when (c-lang-const c-builtin-kwds) + (let ((re (c-make-keywords-re nil (c-lang-const c-builtin-kwds)))) + `((eval . (list ,(concat "\\<\\(" re "\\)\\>") + 1 c-preprocessor-face-name))))) + ;; Fontify all keywords except the primitive types. ,(if (c-major-mode-is 'pike-mode) ;; No symbol is a keyword after "->" in Pike.