emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/csharp-mode d01f22f 149/459: Imenu: fix interface-prefi


From: ELPA Syncer
Subject: [elpa] externals/csharp-mode d01f22f 149/459: Imenu: fix interface-prefixed members
Date: Sun, 22 Aug 2021 13:59:15 -0400 (EDT)

branch: externals/csharp-mode
commit d01f22f67515469f11023b2567c1e53afd467b41
Author: Jostein Kjønigsen <jostein@kjonigsen.net>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>

    Imenu: fix interface-prefixed members
    
    Make interface-prefixed properties and methods report the same way:
    using interface-prefix in imenu index-name.
---
 csharp-mode-tests.el | 5 +++--
 csharp-mode.el       | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el
index dde2d32..099d54f 100644
--- a/csharp-mode-tests.el
+++ b/csharp-mode-tests.el
@@ -209,7 +209,7 @@
          (class-entry    (cl-caddr imenu-index))
          (class-entries  (cdr class-entry))
          (imenu-items    (mapconcat 'car class-entries " ")))
-    (should (string-match-p "prop IImenuTest.InterfaceString" imenu-items))
+    (should (string-match-p "prop IIMenuTest.InterfaceString" imenu-items))
     (kill-buffer buffer)))
 
 (ert-deftest imenu-parsing-supports-explicit-interface-methods ()
@@ -219,8 +219,9 @@
          (class-entry    (cl-caddr imenu-index))
          (class-entries  (cdr class-entry))
          (imenu-items    (mapconcat 'car class-entries " ")))
-    (should (string-match-p "method string MethodName" imenu-items))
+    (should (string-match-p "method string IIMenuTest.MethodName" imenu-items))
     (kill-buffer buffer)))
+
 (ert-deftest imenu-parsing-supports-namespace ()
   (let* ((find-file-hook nil) ;; avoid vc-mode file-hooks when opening!
          (buffer         (find-file-read-only 
"./test-files/imenu-namespace-test.cs"))
diff --git a/csharp-mode.el b/csharp-mode.el
index 3987c1b..aa22c24 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -1485,8 +1485,9 @@ Most other csharp functions are not instrumented.
          "\\(?:override[ \t\n\r\f\v]+\\)?"            ;; optional
          "\\([[:alpha:]_][^\t\(\n]+\\)"               ;; 2. return type - 
possibly generic
          "[ \t\n\r\f\v]+"
+         "\\("                                        ;; 3. begin name of func
          "\\(?:[A-Za-z_][[:alnum:]_]*\\.\\)*"         ;; possible prefix 
interface
-         "\\([[:alpha:]_][[:alnum:]_]*"               ;; 3. begin name of func
+         "[[:alpha:]_][[:alnum:]_]*"                  ;; actual func name
          "\\(?:<\\(?:[[:alpha:]][[:alnum:]]*\\)\\(?:[, 
]+[[:alpha:]][[:alnum:]]*\\)*>\\)?"  ;; (with optional generic type parameter(s)
          "\\)"                                        ;; 3. end of name of func
          "[ \t\n\r\f\v]*"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]