branch: elpa/helm
commit da55bd63bcdfd09cca4630aef5aebdb77b491e6a
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@posteo.net>

    Use various face for annotations in lisp completion
---
 helm-elisp.el | 34 +++++++++++++++++++---------------
 1 file changed, 19 insertions(+), 15 deletions(-)

diff --git a/helm-elisp.el b/helm-elisp.el
index 94bf6b8b24..a19f804af7 100644
--- a/helm-elisp.el
+++ b/helm-elisp.el
@@ -415,22 +415,26 @@ the same time to variable and a function."
            for sym = (if (string-match "\\`:[[:alpha:]]+:\\'" c)
                          c (intern-soft c))
            for annot = (helm-acase sym
-                         ((guard* (stringp it))      "<reg> ")
-                         ((guard* (commandp it))     "<com> ")
-                         ((guard* (class-p it))      "<cla> ")
-                         ((guard* (cl-generic-p it)) "<gen> ")
-                         ((guard* (fboundp it))      "<fun> ")
-                         ((guard* (keywordp it))     "<kwd> ")
-                         ((guard* (boundp it))       "<var> ")
-                         ((guard* (facep it))        "<fac> ")
-                         ((guard* (helm-group-p it)) "<grp> ")
+                         ((guard* (stringp it))
+                          (propertize "<reg> " 'face 'font-lock-regexp-face))
+                         ((guard* (commandp it))
+                          (propertize "<com> " 'face 
'font-lock-function-name-face))
+                         ((guard* (class-p it))
+                          (propertize "<cla> " 'face 'font-lock-type-face))
+                         ((guard* (cl-generic-p it))
+                          (propertize "<gen> " 'face 
'font-lock-function-name-face))
+                         ((guard* (fboundp it))
+                          (propertize "<fun> " 'face 
'font-lock-function-name-face))
+                         ((guard* (keywordp it))
+                          (propertize "<kwd> " 'face 'font-lock-keyword-face))
+                         ((guard* (boundp it))
+                          (propertize "<var> " 'face 
'font-lock-variable-name-face))
+                         ((guard* (facep it))
+                          (propertize "<fac> " 'face 
'font-lock-variable-name-face))
+                         ((guard* (helm-group-p it))
+                          (propertize "<grp> " 'face 'font-lock-type-face))
                          (t                         "      "))
-           collect (cons (concat (helm-aand
-                                  (propertize
-                                   annot 'face 'helm-completions-annotations)
-                                  (propertize " " 'display it))
-                                 c)
-                         c)
+           collect (cons (concat (propertize " " 'display annot) c) c)
            into lst
            finally return (sort lst #'helm-generic-sort-fn)))
 

Reply via email to