summaryrefslogtreecommitdiff
path: root/helm-misc.el
diff options
context:
space:
mode:
authorMichael Heerdegen <michael_heerdegen@web.de>2013-12-10 19:50:28 +0100
committerMichael Heerdegen <michael_heerdegen@web.de>2013-12-10 19:50:28 +0100
commit1d14b774f9e9ccf467668ba4dc26bf842e33401d (patch)
tree539055258b30a4d3e37dd9151f772dde8de77e1d /helm-misc.el
parentdb53c66866ba8874364236b9232b5b48918aa410 (diff)
new fun helm-lacarte-candidate-transformer: propertize key hints with face helm-M-x-key
Diffstat (limited to 'helm-misc.el')
-rw-r--r--helm-misc.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/helm-misc.el b/helm-misc.el
index 684f09af..7ac30474 100644
--- a/helm-misc.el
+++ b/helm-misc.el
@@ -190,9 +190,20 @@ See
(candidates . (lambda ()
(with-helm-current-buffer
(delete '(nil) (lacarte-get-overall-menu-item-alist ,@maps)))))
+ (candidate-transformer . helm-lacarte-candidate-transformer)
(candidate-number-limit . 9999)
(type . command)))
+(defun helm-lacarte-candidate-transformer (cands)
+ (mapcar (lambda (cand)
+ (let* ((item (car cand))
+ (match (string-match "[^>] \\((.*)\\)$" item)))
+ (when match
+ (put-text-property (match-beginning 1) (match-end 1)
+ 'face 'helm-M-x-key item))
+ cand))
+ cands))
+
(defvar helm-source-lacarte (helm-create-lacarte-source "Lacarte")
"Helm interface for lacarte.el.
See