1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

Merge from origin/emacs-26

2075864 (origin/emacs-26) CC Mode: stop extra parens on expression ca...
This commit is contained in:
Glenn Morris 2018-12-10 09:43:05 -08:00
commit 037aabba49

View File

@ -1250,12 +1250,14 @@ casts and declarations are fontified. Used on level 2 and higher."
(c-put-char-property (1- match-pos)
'c-type 'c-decl-arg-start)
(cons 'decl nil))
;; Got an open paren preceded by an arith operator.
;; Got (an) open paren(s) preceded by an arith operator.
((and (eq (char-before match-pos) ?\()
(save-excursion
(goto-char match-pos)
(and (zerop (c-backward-token-2 2))
(looking-at c-arithmetic-op-regexp))))
(while
(progn (c-backward-token-2)
(eq (char-after) ?\()))
(looking-at c-arithmetic-op-regexp)))
(cons nil nil))
;; In a C++ member initialization list.
((and (eq (char-before match-pos) ?,)