branch: elpa/helm commit 2b4ad903cd438cd5da3a214f484a0bafe1292e3b Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Allow using candidates-in-buffer with an alist This was already possible by using a FCT, now it is possible to pass directly an alist of candidates. --- helm-core.el | 3 +++ helm-mode.el | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/helm-core.el b/helm-core.el index 6ea73a0190..d7225f6ca1 100644 --- a/helm-core.el +++ b/helm-core.el @@ -6860,6 +6860,9 @@ when initializing a source with `helm-source-in-buffer' class." (insert (mapconcat (lambda (i) (let ((cand (cond ((symbolp i) (symbol-name i)) ((numberp i) (number-to-string i)) + ((consp i) (propertize + (car i) + 'helm-realvalue (cdr i))) (t i)))) (setq-local helm-candidate-buffer-longest-len (max helm-candidate-buffer-longest-len diff --git a/helm-mode.el b/helm-mode.el index 86c899688c..9d24c39051 100644 --- a/helm-mode.el +++ b/helm-mode.el @@ -964,8 +964,7 @@ method which is faster. EXEC-WHEN-ONLY-ONE allow exiting when COLLECTION contains only one candidate. -ALISTP is same as `helm-comp-read' :alistp slot, don't use it with -CANDS-IN-BUFFER. +ALISTP is same as `helm-comp-read' :alistp slot. When using CANDS-IN-BUFFER, GET-LINE can be specified to exit with candidate handling properties, see `helm-comp-read'.