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

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

[nongnu] elpa/git-commit 8fef6b9651 05/10: magit-status-mode: Add more t


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 8fef6b9651 05/10: magit-status-mode: Add more to Imenu index
Date: Tue, 22 Feb 2022 08:58:19 -0500 (EST)

branch: elpa/git-commit
commit 8fef6b96516e0375fb0d45d6f48053fda8501e00
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    magit-status-mode: Add more to Imenu index
    
    Explicitly exclude the headers, including everything else.  Previously
    we tried to explicitly include everything else, but that doesn't work
    so well when extensions add their own sections, which in all
    likelihood should also be indexed.
---
 lisp/magit-mode.el   | 6 +++++-
 lisp/magit-status.el | 3 +--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index 3a8df694c4..70187d21ba 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -1473,7 +1473,11 @@ mentioned caches completely."
                (lambda (section)
                  (cond
                   (magit--imenu-group-types
-                   (and (magit-section-match magit--imenu-group-types section)
+                   (and (if (eq (car-safe magit--imenu-group-types) 'not)
+                            (not (magit-section-match
+                                  (cdr magit--imenu-group-types)
+                                  section))
+                          (magit-section-match magit--imenu-group-types 
section))
                         (when-let ((children (oref section children)))
                           `((,(magit--imenu-index-name section)
                              ,@(mapcar (lambda (s)
diff --git a/lisp/magit-status.el b/lisp/magit-status.el
index cd97e035b5..2bd428d8e5 100644
--- a/lisp/magit-status.el
+++ b/lisp/magit-status.el
@@ -406,8 +406,7 @@ Type \\[magit-commit] to create a commit.
 \\{magit-status-mode-map}"
   :group 'magit-status
   (hack-dir-local-variables-non-file-buffer)
-  (setq magit--imenu-group-types
-        '(unpushed unstaged unpulled untracked staged stashes pullreqs 
issues)))
+  (setq magit--imenu-group-types '(not branch commit)))
 
 (put 'magit-status-mode 'magit-diff-default-arguments
      '("--no-ext-diff"))



reply via email to

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