branch: elpa/d-mode
commit 5e081297a0cf074fec354ed2b4807bfea8085a5c
Author: Vladimir Panteleev <[email protected]>
Commit: Vladimir Panteleev <[email protected]>
Fix indentation of function out contracts
Partially fixes issue #58.
---
d-mode-test.el | 1 +
d-mode.el | 6 +++---
tests/I0058.d | 15 +++++++++++++++
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/d-mode-test.el b/d-mode-test.el
index f915730..603526f 100644
--- a/d-mode-test.el
+++ b/d-mode-test.el
@@ -311,6 +311,7 @@ is expected to succeed, and nil otherwise."
(d-test-deftest i0039 "tests/I0039.d" (version< "24.4" emacs-version))
(d-test-deftest i0049 "tests/I0049.d" t)
(d-test-deftest i0054 "tests/I0054.d" t)
+(d-test-deftest i0058 "tests/I0058.d" t)
(d-test-deftest i0064 "tests/I0064.d" t)
(d-test-deftest i0069 "tests/I0069.txt" t)
(d-test-deftest i0072 "tests/I0072.txt" t)
diff --git a/d-mode.el b/d-mode.el
index dffe457..e00aa7f 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -7,7 +7,7 @@
;; Maintainer: Russel Winder <[email protected]>
;; Vladimir Panteleev <[email protected]>
;; Created: March 2007
-;; Version: 201908281339
+;; Version: 201908290244
;; Keywords: D programming language emacs cc-mode
;; Package-Requires: ((emacs "24.3"))
@@ -327,12 +327,12 @@ The expression is added to
`compilation-error-regexp-alist' and
(c-lang-defconst c-block-stmt-1-kwds
;; Statement keywords followed directly by a substatement.
- d '("do" "else" "finally" "try" "in" "out" "body"))
+ d '("do" "else" "finally" "try" "in" "body"))
(c-lang-defconst c-block-stmt-2-kwds
;; Statement keywords followed by a paren sexp and then by a substatement.
d '("for" "if" "switch" "while" "catch" "synchronized" "scope"
- "foreach" "foreach_reverse" "with" "unittest"))
+ "foreach" "foreach_reverse" "with" "out" "unittest"))
(c-lang-defconst c-simple-stmt-kwds
;; Statement keywords followed by an expression or nothing.
diff --git a/tests/I0058.d b/tests/I0058.d
new file mode 100644
index 0000000..a405bbf
--- /dev/null
+++ b/tests/I0058.d
@@ -0,0 +1,15 @@
+// #run: (d-test-indent)
+
+double foo()(double b)
+ in // TODO
+ {
+ assert(b == b);
+ }
+out (result)
+ {
+ assert(result == result);
+ }
+body
+ {
+ return b;
+ }