[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/d-mode 07cb4d0 199/346: Add d-lineup-arglists
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/d-mode 07cb4d0 199/346: Add d-lineup-arglists |
Date: |
Sun, 29 Aug 2021 11:00:30 -0400 (EDT) |
branch: elpa/d-mode
commit 07cb4d01d5f6d4708924997b4543a126a88a27ef
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>
Add d-lineup-arglists
Fixes #70, hopefully without side effects.
---
d-mode-test.el | 1 +
d-mode.el | 19 ++++++++++++++++++-
tests/I0070.d | 6 ++++++
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/d-mode-test.el b/d-mode-test.el
index dd1f7f8..50f206c 100644
--- a/d-mode-test.el
+++ b/d-mode-test.el
@@ -316,6 +316,7 @@ is expected to succeed, and nil otherwise."
(d-test-deftest i0064 "tests/I0064.d" t)
(d-test-deftest i0067 "tests/I0067.d" (version< "24.4" emacs-version))
(d-test-deftest i0069 "tests/I0069.txt" t)
+(d-test-deftest i0070 "tests/I0070.d" (version< "24.4" emacs-version))
(d-test-deftest i0072 "tests/I0072.txt" t)
(d-test-deftest i0090 "tests/I0090.d" t)
diff --git a/d-mode.el b/d-mode.el
index 8d5370c..02579f9 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: 201908290919
+;; Version: 201908291019
;; Keywords: D programming language emacs cc-mode
;; Package-Requires: ((emacs "24.3"))
@@ -1134,6 +1134,23 @@ parameters in function calls." ;; checkdoc-params:
langelem
;;----------------------------------------------------------------------------
+(defun d-lineup-arglists (elem)
+ "Line up runtime argument list with compile-time argument list.
+
+Works with: func-decl-cont." ;; checkdoc-params: (elem)
+ (save-excursion
+ (beginning-of-line)
+ (c-backward-syntactic-ws)
+ (let ((c (char-before)))
+ (cond
+ ((eq c ?\))
+ (c-go-list-backward)
+ (vector (current-column)))
+ (t
+ "+")))))
+
+;;----------------------------------------------------------------------------
+
(provide 'd-mode)
;;; d-mode.el ends here
diff --git a/tests/I0070.d b/tests/I0070.d
new file mode 100644
index 0000000..e9bb6df
--- /dev/null
+++ b/tests/I0070.d
@@ -0,0 +1,6 @@
+// #run: (progn (c-set-offset 'func-decl-cont #'d-lineup-arglists)
(d-test-indent))
+
+auto foo(A, B, C)
+ (A a, B b, C c)
+{
+}
- [nongnu] elpa/d-mode ab1057f 159/346: Fix imenu for functions with tail qualifiers on their own line, (continued)
- [nongnu] elpa/d-mode ab1057f 159/346: Fix imenu for functions with tail qualifiers on their own line, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode f61e72c 173/346: Drop support for Emacs < 24.3, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 09745ba 175/346: Merge pull request #87 from CyberShadow/emacs-24-plus, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode cfd1d08 180/346: Use rx-to-string instead of rx-form to support Emacs master (#97), ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode af6dbfa 183/346: Generalize StorageClass/VisibilityAttribute parsing in imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 2964263 184/346: Fix imenu with alias templates, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 71e8bda 196/346: Improve constructor handling and fix constructor contract indentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 28810ef 194/346: Add test for function contracts, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 1bce6c4 191/346: Somewhat improve fontification of module names, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode b413942 198/346: Tighten K&R region detection, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 07cb4d0 199/346: Add d-lineup-arglists,
ELPA Syncer <=
- [nongnu] elpa/d-mode d3ceb14 200/346: Make d--imenu-rx-def-start a compile-time constant, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 0b6a089 217/346: .travis.yml: Try using a emacs-travis.mk which does not use FTP, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 653661e 220/346: Fix parsing qualified types, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode f07f365 201/346: Fix fontification of constructor parameters, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode fd8e70a 209/346: Partially implement D type modifiers (const/immutable/etc.), ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8647147 208/346: Fix tests' minimum Emacs versions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 9ad04a1 213/346: Fix parsing/fontification of some expressions with periods, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5146f2d 215/346: Clear some cc-mode constants, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 3f669a1 231/346: Replace regex-based imenu implementation with cc-mode-based, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode db2c33f 225/346: Fix parsing of D lambda literals' parameter lists, ELPA Syncer, 2021/08/29