[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/d-mode d7f46a2 166/346: Add aliases to imenu
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/d-mode d7f46a2 166/346: Add aliases to imenu |
Date: |
Sun, 29 Aug 2021 11:00:23 -0400 (EDT) |
branch: elpa/d-mode
commit d7f46a28aca981e719d12460bf9b71e355d79565
Author: Vladimir Panteleev <git@thecybershadow.net>
Commit: Vladimir Panteleev <git@thecybershadow.net>
Add aliases to imenu
---
d-mode.el | 42 +++++++++++++++++++++++++++++++++++++++++-
tests/imenu.d | 11 ++++++++++-
2 files changed, 51 insertions(+), 2 deletions(-)
diff --git a/d-mode.el b/d-mode.el
index 840b7a1..89ef834 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: 201610111950
+;; Version: 201610111956
;; Keywords: D programming language emacs cc-mode
;;;; NB Version number is date and time yyyymmddhhMM UTC.
@@ -638,6 +638,46 @@ The expression is added to
`compilation-error-regexp-alist' and
(zero-or-more (any " \t\n"))
(or ":" "{"))
1)
+ ;; NB: We can't easily distinguish aliases declared outside
+ ;; functions from local ones, so just search for those that are
+ ;; declared at the beginning of lines.
+ ("*Aliases*"
+ ,(rx
+ line-start
+ "alias"
+ (one-or-more (syntax whitespace))
+ (submatch
+ (one-or-more
+ (any ?_
+ (?0 . ?9)
+ (?A . ?Z)
+ (?a . ?z))))
+ (zero-or-more (syntax whitespace))
+ "=")
+ 1)
+ ("*Aliases*"
+ ,(rx
+ line-start
+ "alias"
+ (one-or-more (syntax whitespace))
+ (one-or-more
+ (not (any ";")))
+ (one-or-more (syntax whitespace))
+ (submatch
+ (one-or-more
+ (any ?_
+ (?0 . ?9)
+ (?A . ?Z)
+ (?a . ?z))))
+ (zero-or-more (syntax whitespace))
+ ";"
+ (zero-or-more (syntax whitespace))
+ (or
+ eol
+ "//"
+ "/*")
+ )
+ 1)
(nil d-imenu-method-index-function 2)))
;;----------------------------------------------------------------------------
diff --git a/tests/imenu.d b/tests/imenu.d
index 3ab7dab..4743bdc 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)
+// #out: (4 6 11 14 17 19 22 25 33 34 37 40 43 46 49 52 54 56)
void foo(int x) {}
@@ -48,3 +48,12 @@ private final class C
public struct S
{}
+
+alias xmlParse = parseDocument!XmlParseConfig;
+
+alias parseDocument!XmlParseConfig xmlParse;
+
+void test()
+{
+ alias foo = bar;
+}
- [nongnu] elpa/d-mode 53eac10 140/346: tests: Test paren-less calls as well in test for issue #26, (continued)
- [nongnu] elpa/d-mode 53eac10 140/346: tests: Test paren-less calls as well in test for issue #26, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5547400 142/346: Update package version, and link to script to do it automatically, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5dbec4a 146/346: Convert backquote-in-backtick-string regexp to rx, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode daf5e05 149/346: Add basic fontification test, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8318eef 151/346: tests: Work around 24.3 oddity to fix fontification tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 0f3bf01 150/346: tests: Use an older variable name to fix pre-25.1 fontification tests, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 6db43b2 153/346: tests: Add additional tests for #30, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode c9e0b97 154/346: tests: Improve imenu test machinery, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode e26260c 156/346: Fix imenu for functions with multiple tail qualifiers, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode fda6318 165/346: Fix imenu for structs/classes with protection specifiers, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode d7f46a2 166/346: Add aliases to imenu,
ELPA Syncer <=
- [nongnu] elpa/d-mode 98af62e 167/346: tests: Add test for #26 variant with compile- and run-time argument lists, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode a97c92c 168/346: d-mode: Remove 'bit' from keyword list., ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 398f185 171/346: Merge pull request #85 from MartinNowak/fix49, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 8cf1ec5 174/346: Work around Emacs bug #18845, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode f384327 179/346: Fix imenu with typename ending with keyword, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode e809bd1 181/346: Fix imenu with conditional non-function declarations, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 5e08129 192/346: Fix indentation of function out contracts, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 06fb0ff 189/346: Fix indentation of enums with a base type, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 1afddc7 190/346: Fix a typo in a regex, ELPA Syncer, 2021/08/29
- [nongnu] elpa/d-mode 382a677 195/346: Use c-major-mode-is, ELPA Syncer, 2021/08/29