summaryrefslogtreecommitdiff
path: root/lisp/progmodes/cc-fonts.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2018-12-10 09:43:05 -0800
committerGlenn Morris <rgm@gnu.org>2018-12-10 09:43:05 -0800
commit037aabba49bae55bafb10a7284bde85ca1b6a88c (patch)
tree7a0b4bfe7c88f6e7ec15dc8f0f05f2ae6f8fb226 /lisp/progmodes/cc-fonts.el
parentfd1afe2d2ae9565149407b32bcde8ac691f2ce22 (diff)
parent2075864c7717491f1156998120535ce72ed8f0cc (diff)
downloademacs-037aabba49bae55bafb10a7284bde85ca1b6a88c.tar.gz
emacs-037aabba49bae55bafb10a7284bde85ca1b6a88c.tar.bz2
emacs-037aabba49bae55bafb10a7284bde85ca1b6a88c.zip
Merge from origin/emacs-26
2075864 (origin/emacs-26) CC Mode: stop extra parens on expression ca...
Diffstat (limited to 'lisp/progmodes/cc-fonts.el')
-rw-r--r--lisp/progmodes/cc-fonts.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index a216061426c..2e85924f7be 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -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) ?,)