summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-langs.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/cc-langs.el')
-rw-r--r--lisp/progmodes/cc-langs.el22
1 files changed, 22 insertions, 0 deletions
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index d7ef278174a..35097242cb7 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -511,6 +511,12 @@ parameters \(point-min), \(point-max) and <buffer size>."
;;; Lexer-level syntax (identifiers, tokens etc).
+(c-lang-defconst c-has-bitfields
+ "Whether the language has bitfield declarations."
+ t nil
+ (c c++ objc) t)
+(c-lang-defvar c-has-bitfields (c-lang-const c-has-bitfields))
+
(c-lang-defconst c-symbol-start
"Regexp that matches the start of a symbol, i.e. any identifier or
keyword. It's unspecified how far it matches. Does not contain a \\|
@@ -528,6 +534,7 @@ This is of the form that fits inside [ ] in a regexp."
;; operator chars too, but they are handled with other means instead.
t (concat c-alnum "_$")
objc (concat c-alnum "_$@"))
+(c-lang-defvar c-symbol-chars (c-lang-const c-symbol-chars))
(c-lang-defconst c-symbol-key
"Regexp matching identifiers and keywords (with submatch 0). Assumed
@@ -1927,6 +1934,21 @@ one of `c-type-list-kwds', `c-ref-list-kwds',
(c-lang-defvar c-not-decl-init-keywords
(c-lang-const c-not-decl-init-keywords))
+(c-lang-defconst c-not-primitive-type-keywords
+ "List of all keywords apart from primitive types (like \"int\")."
+ t (set-difference (c-lang-const c-keywords)
+ (c-lang-const c-primitive-type-kwds)
+ :test 'string-equal)
+ ;; The "more" for C++ is the QT keyword (as in "more slots:").
+ ;; This variable is intended for use in c-beginning-of-statement-1.
+ c++ (append (c-lang-const c-not-primitive-type-keywords) '("more")))
+
+(c-lang-defconst c-not-primitive-type-keywords-regexp
+ t (c-make-keywords-re t
+ (c-lang-const c-not-primitive-type-keywords)))
+(c-lang-defvar c-not-primitive-type-keywords-regexp
+ (c-lang-const c-not-primitive-type-keywords-regexp))
+
(c-lang-defconst c-protection-kwds
"Access protection label keywords in classes."
t nil