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

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

[nongnu] elpa/d-mode de2a20eb21 5/5: Merge pull request #124 from VPante


From: ELPA Syncer
Subject: [nongnu] elpa/d-mode de2a20eb21 5/5: Merge pull request #124 from VPanteleev-S7/imenu-29
Date: Tue, 26 Nov 2024 07:00:01 -0500 (EST)

branch: elpa/d-mode
commit de2a20eb21ae9bddfa86468a7522b0ba29f0c387
Merge: e4dd795cb1 2e5e43d35c
Author: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
Commit: GitHub <noreply@github.com>

    Merge pull request #124 from VPanteleev-S7/imenu-29
    
    Fix imenu with UDAs on Emacs 29.1
---
 .github/workflows/test.yml | 1 +
 d-mode.el                  | 5 +++--
 tests/I0124.d              | 5 +++++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index ea74cc6b73..2b00987087 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -20,6 +20,7 @@ jobs:
         - 27.2
         - 28.1
         - 28.2
+        - 29.1
         - snapshot
     steps:
     - uses: purcell/setup-emacs@master
diff --git a/d-mode.el b/d-mode.el
index 2cb7b8f17a..bfefbaf927 100644
--- a/d-mode.el
+++ b/d-mode.el
@@ -1616,8 +1616,9 @@ The expression is added to 
`compilation-error-regexp-alist' and
           (lambda (match-pos inside-macro toplev)
             (when toplev
               (let* ((got-context
-                      (c-get-fontification-context
-                       match-pos nil toplev))
+                      (save-excursion
+                        (c-get-fontification-context
+                         match-pos nil toplev)))
                      (context (car got-context))
                      (decl-or-cast
                       (when (eq context 'top)
diff --git a/tests/I0124.d b/tests/I0124.d
new file mode 100644
index 0000000000..f15e45f07c
--- /dev/null
+++ b/tests/I0124.d
@@ -0,0 +1,5 @@
+// #run: (d-test-get-imenu-lines)
+// #out: (5)
+
+@doc("test")
+struct Foo {}



reply via email to

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