diff options
| author | Glenn Morris | 2018-12-10 09:43:05 -0800 |
|---|---|---|
| committer | Glenn Morris | 2018-12-10 09:43:05 -0800 |
| commit | 037aabba49bae55bafb10a7284bde85ca1b6a88c (patch) | |
| tree | 7a0b4bfe7c88f6e7ec15dc8f0f05f2ae6f8fb226 | |
| parent | fd1afe2d2ae9565149407b32bcde8ac691f2ce22 (diff) | |
| parent | 2075864c7717491f1156998120535ce72ed8f0cc (diff) | |
| download | emacs-037aabba49bae55bafb10a7284bde85ca1b6a88c.tar.gz emacs-037aabba49bae55bafb10a7284bde85ca1b6a88c.zip | |
Merge from origin/emacs-26
2075864 (origin/emacs-26) CC Mode: stop extra parens on expression ca...
| -rw-r--r-- | lisp/progmodes/cc-fonts.el | 8 |
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." | |||
| 1250 | (c-put-char-property (1- match-pos) | 1250 | (c-put-char-property (1- match-pos) |
| 1251 | 'c-type 'c-decl-arg-start) | 1251 | 'c-type 'c-decl-arg-start) |
| 1252 | (cons 'decl nil)) | 1252 | (cons 'decl nil)) |
| 1253 | ;; Got an open paren preceded by an arith operator. | 1253 | ;; Got (an) open paren(s) preceded by an arith operator. |
| 1254 | ((and (eq (char-before match-pos) ?\() | 1254 | ((and (eq (char-before match-pos) ?\() |
| 1255 | (save-excursion | 1255 | (save-excursion |
| 1256 | (goto-char match-pos) | 1256 | (goto-char match-pos) |
| 1257 | (and (zerop (c-backward-token-2 2)) | 1257 | (while |
| 1258 | (looking-at c-arithmetic-op-regexp)))) | 1258 | (progn (c-backward-token-2) |
| 1259 | (eq (char-after) ?\())) | ||
| 1260 | (looking-at c-arithmetic-op-regexp))) | ||
| 1259 | (cons nil nil)) | 1261 | (cons nil nil)) |
| 1260 | ;; In a C++ member initialization list. | 1262 | ;; In a C++ member initialization list. |
| 1261 | ((and (eq (char-before match-pos) ?,) | 1263 | ((and (eq (char-before match-pos) ?,) |