From fe307a8c1417e0f3784dac3943cdc47c5cc49e27 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Tue, 15 Dec 2015 19:15:23 +0000 Subject: [PATCH] el/dot-emacs.el (mdw-fontify-c-and-c++): New keywords from later standards. Organization: Straylight/Edgeware From: Mark Wooding Include the keywords from C11 and C++11. --- el/dot-emacs.el | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 19d594d..b1b901b 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -1333,9 +1333,12 @@ (defun mdw-fontify-c-and-c++ () ;; Now define things to be fontified. (make-local-variable 'font-lock-keywords) (let ((c-keywords - (mdw-regexps "and" ;C++, C95 macro + (mdw-regexps "alignas" ;C11 macro, C++11 + "alignof" ;C++11 + "and" ;C++, C95 macro "and_eq" ;C++, C95 macro "asm" ;K&R, C++, GCC + "atomic" ;C11 macro, C++11 template type "auto" ;K&R, C89 "bitand" ;C++, C95 macro "bitor" ;C++, C95 macro @@ -1344,12 +1347,16 @@ (defun mdw-fontify-c-and-c++ () "case" ;K&R, C89 "catch" ;C++ "char" ;K&R, C89 + "char16_t" ;C++11, C11 library type + "char32_t" ;C++11, C11 library type "class" ;C++ "complex" ;C99 macro, C++ template type "compl" ;C++, C95 macro "const" ;C89 + "constexpr" ;C++11 "const_cast" ;C++ "continue" ;K&R, C89 + "decltype" ;C++11 "defined" ;C89 preprocessor "default" ;K&R, C89 "delete" ;C++ @@ -1375,8 +1382,11 @@ (defun mdw-fontify-c-and-c++ () "mutable" ;C++ "namespace" ;C++ "new" ;C++ + "noexcept" ;C++11 + "noreturn" ;C11 macro "not" ;C++, C95 macro "not_eq" ;C++, C95 macro + "nullptr" ;C++11 "operator" ;C++ "or" ;C++, C95 macro "or_eq" ;C++, C95 macro @@ -1391,12 +1401,14 @@ (defun mdw-fontify-c-and-c++ () "signed" ;C89 "sizeof" ;K&R, C89 "static" ;K&R, C89 + "static_assert" ;C11 macro, C++11 "static_cast" ;C++ "struct" ;K&R, C89 "switch" ;K&R, C89 "template" ;C++ "throw" ;C++ "try" ;C++ + "thread_local" ;C11 macro, C++11 "typedef" ;C89 "typeid" ;C++ "typeof" ;GCC @@ -1411,10 +1423,17 @@ (defun mdw-fontify-c-and-c++ () "while" ;K&R, C89 "xor" ;C++, C95 macro "xor_eq" ;C++, C95 macro + "_Alignas" ;C11 + "_Alignof" ;C11 + "_Atomic" ;C11 "_Bool" ;C99 "_Complex" ;C99 + "_Generic" ;C11 "_Imaginary" ;C99 + "_Noreturn" ;C11 "_Pragma" ;C99 preprocessor + "_Static_assert" ;C11 + "_Thread_local" ;C11 "__alignof__" ;GCC "__asm__" ;GCC "__attribute__" ;GCC -- [mdw]