diff options
author | Michael Heerdegen <michael_heerdegen@web.de> | 2013-12-10 19:50:28 +0100 |
---|---|---|
committer | Michael Heerdegen <michael_heerdegen@web.de> | 2013-12-10 19:50:28 +0100 |
commit | 1d14b774f9e9ccf467668ba4dc26bf842e33401d (patch) | |
tree | 539055258b30a4d3e37dd9151f772dde8de77e1d /helm-misc.el | |
parent | db53c66866ba8874364236b9232b5b48918aa410 (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.el | 11 |
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 |