diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2019-11-14 08:54:39 +0100 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2019-11-14 08:54:39 +0100 |
commit | 9ff2abce135b56106ede0beea27dae643726f397 (patch) | |
tree | 4c25a3bb85595063aa67c061e26a9d624ade1e0f | |
parent | 5d7fad519a68a4bd41a7145639af6bbd5040ad83 (diff) |
Fix helm-dynamic-completion again with circular objects
* helm-lib.el (helm-dynamic-completion): Do it.
-rw-r--r-- | helm-lib.el | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/helm-lib.el b/helm-lib.el index be766c75..58b77f26 100644 --- a/helm-lib.el +++ b/helm-lib.el @@ -1363,22 +1363,23 @@ Example: " (lambda () (let* ((completion-styles (append completion-styles '(helm))) - ;; Ensure circular objects are removed. - (data (complete-with-action t collection "" predicate)) - (comps (completion-all-completions - helm-pattern - data - predicate - (or point 0) - (or metadata '(metadata)))) - (last-data (last comps)) - (sort-fn (completion-metadata-get - metadata 'display-sort-function)) - all) - (helm-aif (cdr last-data) - (setcdr last-data nil)) - (setq all (copy-sequence comps)) - (if sort-fn (funcall sort-fn all) all)))) + (compsfn (lambda (str pred _action) + (let* ((comps (completion-all-completions + str + collection + pred + (or point 0) + (or metadata '(metadata)))) + (last-data (last comps)) + (sort-fn (completion-metadata-get + metadata 'display-sort-function)) + all) + (helm-aif (cdr last-data) + (setcdr last-data nil)) + (setq all (copy-sequence comps)) + (if sort-fn (funcall sort-fn all) all))))) + ;; Ensure circular objects are removed. + (complete-with-action t compsfn helm-pattern predicate)))) ;; Yank text at point. ;; |