diff options
author | Thierry Volpiatto <thievol@posteo.net> | 2020-08-29 12:17:43 +0200 |
---|---|---|
committer | Thierry Volpiatto <thievol@posteo.net> | 2020-08-29 12:25:47 +0200 |
commit | 0fa80a8b62eba89e0510cac5a5f8009573ce6933 (patch) | |
tree | 1274ad121fc52002450c42919d6489c02f9b8392 /helm-lib.el | |
parent | 220f1bc5d387d26b7221ee9f1978210b6a85d4e9 (diff) |
Handle lambda's in helm-append-at-nth
Diffstat (limited to 'helm-lib.el')
-rw-r--r-- | helm-lib.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/helm-lib.el b/helm-lib.el index 2e135a6f..f5011d95 100644 --- a/helm-lib.el +++ b/helm-lib.el @@ -903,7 +903,7 @@ ARGS is (cand1 cand2 ...) or ((disp1 . real1) (disp2 . real2) ...) (defsubst helm-append-1 (elm seq) "Append ELM to SEQ. If ELM is not a list transform it in list." - (append (if (listp elm) elm (list elm)) seq)) + (append (helm-mklist elm) seq)) (defun helm-append-at-nth (seq elm index) "Append ELM at INDEX in SEQ." @@ -914,7 +914,8 @@ If ELM is not a list transform it in list." (cl-loop for i in seq for count from 1 collect i when (= count index) - if (listp elm) append elm + if (and (listp elm) (not (functionp elm))) + append elm else collect elm)))) (defun helm-take-first-elements (seq n) |