branch: elpa/helm
commit e495f66454f6179375380d4a5dddaffaab34ad23
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@posteo.net>

    Disable wrong-number-of-arguments errors in dst
    
    This allow skiping dst *acase branchs (return nil) that don't fit with
    cl-destructuring-bind ARGS.
---
 helm-lib.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/helm-lib.el b/helm-lib.el
index da933cbfc3..1c0577661e 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -613,9 +613,11 @@ usable in all clauses to refer to EXPR.
                 ;; referenced variables (the ones in `dst' that will be used in
                 ;; next branch) Merci Stefan!
                 (with-no-warnings ,@(cdr clause1)))
-               (dst
-                (cl-destructuring-bind ,dst-sexp it
-                  ,@(cdr clause1)))
+               ((and dst
+                     (condition-case nil
+                         (cl-destructuring-bind ,dst-sexp it
+                           ,@(cdr clause1))
+                       (wrong-number-of-arguments nil))))
                (t
                 (helm-acase it ,@(cdr clauses))))))))
 

Reply via email to