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

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

[elpa] externals/marginalia 75e9e9b 070/241: add marginalia-annotate-cha


From: Stefan Monnier
Subject: [elpa] externals/marginalia 75e9e9b 070/241: add marginalia-annotate-charset
Date: Fri, 28 May 2021 20:48:59 -0400 (EDT)

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

    add marginalia-annotate-charset
    
    one of the more obscure features, works with describe-character-set
---
 marginalia.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/marginalia.el b/marginalia.el
index 2f7bc8f..679d8a9 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -145,6 +145,7 @@ only with the annotations that come with Emacs) without 
disabling
     (minor-mode . marginalia-annotate-minor-mode)
     (symbol . marginalia-annotate-symbol)
     (variable . marginalia-annotate-variable)
+    (charset . marginalia-annotate-charset)
     (package . marginalia-annotate-package))
   "Lightweight annotator functions.
 Associates completion categories with annotation functions.
@@ -187,6 +188,7 @@ determine it."
     ("\\<package\\>" . package)
     ("\\<face\\>" . face)
     ("\\<variable\\>" . variable)
+    ("\\<charset\\>" . charset)
     ("\\<minor mode\\>" . minor-mode))
   "Associates regexps to match against minibuffer prompts with categories."
   :type '(alist :key-type regexp :value-type symbol)
@@ -351,6 +353,10 @@ This hash table is needed to speed up 
`marginalia-annotate-command-binding'.")
   "Annotate customization group CAND with its documentation string."
   (marginalia--documentation (documentation-property (intern cand) 
'group-documentation)))
 
+(defun marginalia-annotate-charset (cand)
+  "Annotate charset CAND with its description."
+  (marginalia--documentation (charset-description (intern cand))))
+
 (defun marginalia-annotate-buffer (cand)
   "Annotate buffer CAND with modification status, file name and major mode."
   (when-let (buffer (get-buffer cand))



reply via email to

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