summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-engine.el
diff options
context:
space:
mode:
authorAlan Mackenzie <acm@muc.de>2017-12-14 17:55:59 +0000
committerAlan Mackenzie <acm@muc.de>2017-12-14 17:55:59 +0000
commitf838210b018b74b5dd86800aba807c78c921fc3a (patch)
tree217b3c7d87e26f302926a3fba8fb6e1b6f4437ff /lisp/progmodes/cc-engine.el
parent232c6465ce789f980da16063a865ac915b060ca4 (diff)
downloademacs-f838210b018b74b5dd86800aba807c78c921fc3a.tar.gz
emacs-f838210b018b74b5dd86800aba807c78c921fc3a.tar.bz2
emacs-f838210b018b74b5dd86800aba807c78c921fc3a.zip
Fix misfontification of C++ member initialization list after "throw"
* lisp/progmodes/cc-engine.el (c-forward-type): Stop recognizing a "type" starting with "throw", by using c-opt-type-modifier-prefix-key. * lisp/progmodes/cc-langs.el (c-type-modifier-prefix-kwds): New lang const which, in C++, doesn't contain "throw", otherwise like c-type-modifier-kwds. (c-opt-type-modifier-prefix-key): New lang const and var, a regexp matching any keyword in the previous lang const.
Diffstat (limited to 'lisp/progmodes/cc-engine.el')
-rw-r--r--lisp/progmodes/cc-engine.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 138a0e5da21..881209c286e 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -7572,8 +7572,8 @@ comment at the start of cc-engine.el for more info."
;; Skip leading type modifiers. If any are found we know it's a
;; prefix of a type.
- (when c-opt-type-modifier-key ; e.g. "const" "volatile", but NOT "typedef"
- (while (looking-at c-opt-type-modifier-key)
+ (when c-opt-type-modifier-prefix-key ; e.g. "const" "volatile", but NOT "typedef"
+ (while (looking-at c-opt-type-modifier-prefix-key)
(goto-char (match-end 1))
(c-forward-syntactic-ws)
(setq res 'prefix)))