1 new commit in cc-mode:
https://bitbucket.org/xemacs/cc-mode/commits/125218d347ca/
Changeset: 125218d347ca
User: acm
Date: 2017-12-14 20:55:10+00:00
Summary: Fix fontification of first declaration within a C++ lambda form.
* cc-engine.el (c-looking-at-or-maybe-in-bracelist): Cease spuriously
recognizing the braces of a lambda form as a brace list when there is an "="
preceding the introductory brackets.
Affected #: 1 file
diff -r f403d0ee1451d89f9bc647ae8c73dc96c7551952 -r
125218d347ca602b4f09318fb79c8ca6fb895fc9 cc-engine.el
--- a/cc-engine.el
+++ b/cc-engine.el
@@ -10449,7 +10449,7 @@
c-decl-block-key))
(braceassignp 'dontknow)
inexpr-brace-list bufpos macro-start res pos after-type-id-pos
- in-paren)
+ in-paren parens-before-brace)
(setq res (c-backward-token-2 1 t lim))
;; Checks to do only on the first sexp before the brace.
@@ -10467,6 +10467,9 @@
((and (looking-at c-symbol-start)
(not (looking-at c-keywords-regexp)))
(setq after-type-id-pos (point)))
+ ((eq (char-after) ?\()
+ (setq parens-before-brace t)
+ nil)
(t nil))
(save-excursion
(cond
@@ -10515,6 +10518,14 @@
;; Single identifier between '(' and '{'. We have a bracelist.
(cons after-type-id-pos 'in-paren))
+ ;; Are we at the parens of a C++ lambda expression?
+ ((and parens-before-brace
+ (save-excursion
+ (and
+ (zerop (c-backward-token-2 1 t lim))
+ (c-looking-at-c++-lambda-capture-list))))
+ nil) ; a lambda expression isn't a brace list.
+
(t
(goto-char pos)
;; Checks to do on all sexps before the brace, up to the
Repository URL:
https://bitbucket.org/xemacs/cc-mode/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.