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

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

[nongnu] elpa/swift-mode 2e9bdc6 430/496: Ignore import declarations in


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode 2e9bdc6 430/496: Ignore import declarations in Imenu
Date: Sun, 29 Aug 2021 11:34:21 -0400 (EDT)

branch: elpa/swift-mode
commit 2e9bdc692cbf7c2f125de465133ebf3be83e94d8
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>

    Ignore import declarations in Imenu
---
 swift-mode-imenu.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/swift-mode-imenu.el b/swift-mode-imenu.el
index df771e2..742e2e4 100644
--- a/swift-mode-imenu.el
+++ b/swift-mode-imenu.el
@@ -118,6 +118,12 @@ Return found declarations in reverse order."
       (setq next-text (swift-mode:token:text next-token))
 
       (cond
+       ((equal next-text "import")
+        ;; Skips an import kind, for example, "class" token below:
+        ;;
+        ;; import class Foo.Bar
+        (swift-mode:forward-token-or-list-except-curly-bracket))
+
        ((equal next-text "class")
         ;; "class" token may be either a class declaration keyword or a
         ;; modifier:



reply via email to

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