[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] [emacs] 01/01: progmodes/cc-langs.el: Support some of the
From: |
Rüdiger Sonderfeld |
Subject: |
[Emacs-diffs] [emacs] 01/01: progmodes/cc-langs.el: Support some of the new keywords in C++11. |
Date: |
Tue, 18 Nov 2014 02:37:03 +0000 |
branch: master
commit 0b37f903b62b29726644dbad330d2a0bf91d85d6
Author: Paul Pogonyshev <address@hidden>
Date: Tue Nov 18 03:34:01 2014 +0100
progmodes/cc-langs.el: Support some of the new keywords in C++11.
(c-operators): Add "alignof".
(c-primitive-type-kwds): Add "char16_t", "char32_t".
(c-type-modifier-kwds): Add "constexpr", "noexcept".
(c-modifier-kwds): Add "thread_local".
(c-constant-kwds): Add "nullptr".
Original patch by Paul Pogonyshev <address@hidden> and updated
by Rüdiger Sonderfeld <address@hidden>.
---
lisp/ChangeLog | 11 +++++++++++
lisp/progmodes/cc-langs.el | 15 ++++++++++-----
2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0075c5a..968ea8d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,14 @@
+2014-11-18 Paul Pogonyshev <address@hidden>
+ Rüdiger Sonderfeld <address@hidden>
+
+ * progmodes/cc-langs.el: Support some of the new keywords in
+ C++11.
+ (c-operators): Add "alignof".
+ (c-primitive-type-kwds): Add "char16_t", "char32_t".
+ (c-type-modifier-kwds): Add "constexpr", "noexcept".
+ (c-modifier-kwds): Add "thread_local".
+ (c-constant-kwds): Add "nullptr".
+
2014-11-17 Michal Nazarewicz <address@hidden>
* textmodes/tildify.el (tildify-pattern, tildify-space-string):
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 2a5db6d..68b2d62 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -970,7 +970,8 @@ since CC Mode treats every identifier as an expression."
,@(when (c-major-mode-is 'c++-mode)
;; The following need special treatment.
`((prefix "dynamic_cast" "static_cast"
- "reinterpret_cast" "const_cast" "typeid")))
+ "reinterpret_cast" "const_cast" "typeid"
+ "alignof")))
(left-assoc "."
,@(unless (c-major-mode-is 'java-mode)
'("->")))
@@ -1648,7 +1649,7 @@ the appropriate place for that."
'("_Bool" "_Complex" "_Imaginary") ; Conditionally defined in C99.
(c-lang-const c-primitive-type-kwds))
c++ (append
- '("bool" "wchar_t")
+ '("bool" "wchar_t" "char16_t" "char32_t")
(c-lang-const c-primitive-type-kwds))
;; Objective-C extends C, but probably not the new stuff in C99.
objc (append
@@ -1730,7 +1731,7 @@ but they don't build a type of themselves. Unlike the
keywords on
not the type face."
t nil
c '("const" "restrict" "volatile")
- c++ '("const" "volatile" "throw")
+ c++ '("const" "constexpr" "noexcept" "volatile" "throw")
objc '("const" "volatile"))
(c-lang-defconst c-opt-type-modifier-key
@@ -1932,7 +1933,8 @@ If any of these also are on `c-type-list-kwds',
`c-ref-list-kwds',
will be handled."
t nil
(c c++) '("auto" "extern" "inline" "register" "static")
- c++ (append '("explicit" "friend" "mutable" "template" "using" "virtual")
+ c++ (append '("explicit" "friend" "mutable" "template" "thread_local"
+ "using" "virtual")
(c-lang-const c-modifier-kwds))
objc '("auto" "bycopy" "byref" "extern" "in" "inout" "oneway" "out" "static")
;; FIXME: Some of those below ought to be on `c-other-decl-kwds' instead.
@@ -2384,8 +2386,11 @@ This construct is \"<keyword> <expression> :\"."
(c-lang-defconst c-constant-kwds
"Keywords for constants."
t nil
- (c c++) '("NULL" ;; Not a keyword, but practically works as one.
+ c '("NULL" ;; Not a keyword, but practically works as one.
"false" "true") ; Defined in C99.
+ c++ (append
+ '("nullptr")
+ (c-lang-const c-constant-kwds))
objc '("nil" "Nil" "YES" "NO" "NS_DURING" "NS_HANDLER" "NS_ENDHANDLER")
idl '("TRUE" "FALSE")
java '("true" "false" "null") ; technically "literals", not keywords
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] [emacs] 01/01: progmodes/cc-langs.el: Support some of the new keywords in C++11.,
Rüdiger Sonderfeld <=