[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/d-mode 4586b41 314/346: Fix mis-interpreting parts of some
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/d-mode 4586b41 314/346: Fix mis-interpreting parts of some compound statements as lambdas |
Date: |
Sun, 29 Aug 2021 11:00:51 -0400 (EDT) |
branch: elpa/d-mode
commit 4586b41c7e40cf72b78262c9aea1297c5993b785
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>
Fix mis-interpreting parts of some compound statements as lambdas
---
d-mode.el | 6 +++++-
tests/fonts.d | 12 ++++++++++++
tests/fonts.d.html | 12 ++++++++++++
3 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/d-mode.el b/d-mode.el
index 6ac7369..4d8f7aa 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -7,7 +7,7 @@
;; Maintainer: Russel Winder <russel@winder.org.uk>
;; Vladimir Panteleev <vladimir@thecybershadow.net>
;; Created: March 2007
-;; Version: 201911121026
+;; Version: 201911121047
;; Keywords: D programming language emacs cc-mode
;; Package-Requires: ((emacs "25.1"))
@@ -812,6 +812,10 @@ CONTEXT is as in `c-forward-decl-or-cast-1'."
(and
(c-backward-token-2)
(cond
+ ((looking-at (d-make-keywords-re t '("if" "while" "for"
"switch"
+ "with"
"synchronized")))
+ (setq type nil)
+ t)
((looking-at (d-make-keywords-re t '("foreach"
"foreach_reverse")))
t)
((looking-at (d-make-keywords-re t '("catch")))
diff --git a/tests/fonts.d b/tests/fonts.d
index 509c798..a32295d 100644
--- a/tests/fonts.d
+++ b/tests/fonts.d
@@ -47,3 +47,15 @@ void fun()
submodule.needHead(commit);
return gun();
}
+
+void fun()
+{
+ if (a) {}
+ while (a) {}
+ for (a; b; c) {}
+ switch (a) {}
+ final switch (a) {}
+ with (a) {}
+ synchronized (a) {}
+ debug (a) {}
+}
diff --git a/tests/fonts.d.html b/tests/fonts.d.html
index de7f887..9508e08 100644
--- a/tests/fonts.d.html
+++ b/tests/fonts.d.html
@@ -47,3 +47,15 @@ write(s ~ <span class="string">""</span>);
submodule.needHead(commit);
<span class="keyword">return</span> gun();
}
+
+<span class="type">void</span> <span class="function-name">fun</span>()
+{
+ <span class="keyword">if</span> (a) {}
+ <span class="keyword">while</span> (a) {}
+ <span class="keyword">for</span> (a; b; c) {}
+ <span class="keyword">switch</span> (a) {}
+ <span class="keyword">final switch</span> (a) {}
+ <span class="keyword">with</span> (a) {}
+ <span class="keyword">synchronized</span> (a) {}
+ <span class="keyword">debug</span> (<span class="constant">a</span>) {}
+}
- [nongnu] elpa/d-mode 26e7337 253/346: Don't put variables in imenu, (continued)
- [nongnu] elpa/d-mode 26e7337 253/346: Don't put variables in imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 372c135 274/346: Makefile: Fail on byte-compilation warnings, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode a0e95f4 282/346: Remove cl-lib dependency, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 2b48656 285/346: Simplify c-forward-decl-or-cast-1 advice, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 936944f 294/346: tests: Update test minimal versions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode fb94d19 295/346: Fix fontification of "xxxmodule.yyy", ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 6cbba0e 301/346: Fix fontification of lone protection labels, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 2bb5809 304/346: Move conditional compilation to within function bodies, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode c29b03d 302/346: .travis.yml: Remove redundant "compile" step, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode c8413d2 317/346: tests: Rename fonts_lambda_params to fonts_params, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 4586b41 314/346: Fix mis-interpreting parts of some compound statements as lambdas,
ELPA Syncer <=
- [nongnu] elpa/d-mode e759406 324/346: tests: New testcase, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 50fef92 321/346: Enable Coveralls parallel builds, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 0522d1c 320/346: Bundle our own undercover.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode df9c8a1 322/346: Fontify types in casts, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5190c1d 323/346: Fix fontification of parameters of lambdas inside expressions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode bc4864d 325/346: d-mode.el: Remove c-font-lock-declarations advice, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode a233437 329/346: Add "version" to c-block-stmt-2-kwds, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5da089b 332/346: tests: Replace #min-version with a more generic #condition, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 9f6a2b6 339/346: Handle c-forward-sexp error in d-around--c-get-fontification-context, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 54aca49 333/346: tests/I0021: Disable on Emacs >=27 for now, ELPA Syncer, 2021/08/29