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

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

[elpa] externals/marginalia 2c8c5d4230: Add marginalia-annotate-theme ba


From: ELPA Syncer
Subject: [elpa] externals/marginalia 2c8c5d4230: Add marginalia-annotate-theme based on marginalia-annotate-library
Date: Fri, 4 Aug 2023 03:58:16 -0400 (EDT)

branch: externals/marginalia
commit 2c8c5d423079d74abda6890028a31daefe45a3e5
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Add marginalia-annotate-theme based on marginalia-annotate-library
    
    Themes are just libraries with a feature name ending in -theme.
---
 CHANGELOG.org | 4 ++++
 marginalia.el | 8 +++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 3d160c26e5..75bd553d4d 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -2,6 +2,10 @@
 #+author: Omar AntolĂ­n Camarena, Daniel Mendler
 #+language: en
 
+* Development
+
+- Add =marginalia-annotate-theme= based on =marginalia-annotate-library=.
+
 * Version 1.3 (2023-07-02)
 
 - =marginalia-classify-by-prompt=: Use case-insensitive matching.
diff --git a/marginalia.el b/marginalia.el
index 627ceb858f..f6abf71513 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -99,6 +99,7 @@ a relative age."
      (project-file marginalia-annotate-project-file)
      (buffer marginalia-annotate-buffer)
      (library marginalia-annotate-library)
+     (theme marginalia-annotate-theme)
      (tab marginalia-annotate-tab)
      (multi-category marginalia-annotate-multi-category)))
   "Annotator function registry.
@@ -134,7 +135,8 @@ determine it."
     ("\\<minor mode\\>" . minor-mode)
     ("\\<kill-ring\\>" . kill-ring)
     ("\\<tab by name\\>" . tab)
-    ("\\<library\\>" . library))
+    ("\\<library\\>" . library)
+    ("\\<theme\\>" . theme))
   "Associates regexps to match against minibuffer prompts with categories.
 The prompts are matched case-insensitively."
   :type '(alist :key-type regexp :value-type symbol))
@@ -1085,6 +1087,10 @@ These annotations are skipped for remote paths."
       (put-text-property 0 1 'marginalia--library-doc doc file))
     doc))
 
+(defun marginalia-annotate-theme (cand)
+  "Annotate theme CAND with documentation and path."
+  (marginalia-annotate-library (concat cand "-theme")))
+
 (defun marginalia-annotate-library (cand)
   "Annotate library CAND with documentation and path."
   (setq cand (marginalia--library-name cand))



reply via email to

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