branch: elpa/d-mode
commit 8606775470ecefa02d1b0d0954e10081676d8693
Author: Vladimir Panteleev <[email protected]>
Commit: Vladimir Panteleev <[email protected]>
Fix imenu jump position for new-style aliases
---
d-mode.el | 6 +++---
tests/imenu.d | 7 ++++++-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/d-mode.el b/d-mode.el
index 64f9459..02bc10a 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: 201909092113
+;; Version: 201909092122
;; Keywords: D programming language emacs cc-mode
;; Package-Requires: ((emacs "25.1"))
@@ -620,8 +620,8 @@ Each list item should be a regexp matching a single
identifier."
d-spots
(cons
(if (eq kind t)
- (cons name (car decl-or-cast))
- (list kind (cons name (car decl-or-cast))))
+ (cons name id-start)
+ (list kind (cons name id-start)))
d-spots)))))))))
(nreverse d-spots)))
diff --git a/tests/imenu.d b/tests/imenu.d
index 0b49bb5..4cc2099 100644
--- a/tests/imenu.d
+++ b/tests/imenu.d
@@ -1,5 +1,5 @@
// #run: (d-test-get-imenu-lines)
-// #out: (4 6 11 14 17 19 22 25 33 34 37 40 43 46 49 52 54 56 67 75 78 81 84
87 89 93 94 96 97 99)
+// #out: (4 6 11 14 17 19 22 25 33 34 37 40 43 46 49 52 54 56 67 75 78 81 84
87 89 93 94 96 97 99 104)
void foo(int x) {}
@@ -99,3 +99,8 @@ Parameter!("foo()") run(string command) {}
string[string] environment;
static import std.process;
+
+alias
+ Number
+ =
+ int;