[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 33f856b: C Mode: Fix mis-fontification of macro inv
From: |
Alan Mackenzie |
Subject: |
[Emacs-diffs] master 33f856b: C Mode: Fix mis-fontification of macro invocation as function declaration |
Date: |
Fri, 16 Sep 2016 10:50:55 +0000 (UTC) |
branch: master
commit 33f856ba01d13f649cf5c848b322ecb0dbfc02fc
Author: Alan Mackenzie <address@hidden>
Commit: Alan Mackenzie <address@hidden>
C Mode: Fix mis-fontification of macro invocation as function declaration
This happened with a macro invocation which was followed by a statement
block
in braces.
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): CASE 11:
distinguish
between contexts nil and top, being less permissive in the former case.
(c-just-after-func-arglist-p): call c-forward-decl-or-cast-1 with context
top.
---
lisp/progmodes/cc-engine.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index a1574b2..9bd78fb 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -8631,8 +8631,10 @@ comment at the start of cc-engine.el for more info."
;; CASE 11
(when (and got-identifier
- (memq context '(nil top))
(looking-at c-after-suffixed-type-decl-key)
+ (or (eq context 'top)
+ (and eq context nil
+ (match-beginning 1)))
(if (and got-parens
(not got-prefix)
(not got-suffix)
@@ -9310,7 +9312,7 @@ comment at the start of cc-engine.el for more info."
(c-forward-objc-directive)))
(setq id-start
- (car-safe (c-forward-decl-or-cast-1 (c-point 'bosws) nil nil)))
+ (car-safe (c-forward-decl-or-cast-1 (c-point 'bosws) 'top nil)))
(< id-start beg)
;; There should not be a '=' or ',' between beg and the
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 33f856b: C Mode: Fix mis-fontification of macro invocation as function declaration,
Alan Mackenzie <=