branch: externals/dash commit ca2f7673a5d91a2869a6589e77780739cd8668f9 Author: Wilfred Hughes <m...@wilfred.me.uk> Commit: Wilfred Hughes <m...@wilfred.me.uk>
Show (VAR VAL) in the function signature This saves us having to explain the syntax in the docstring. --- dash.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dash.el b/dash.el index 4a33706..5027959 100644 --- a/dash.el +++ b/dash.el @@ -1897,9 +1897,11 @@ encountered." (defmacro -if-let (var-val then &rest else) "If VAL evaluates to non-nil, bind it to VAR and do THEN, -otherwise do ELSE. VAR-VAL should be a (VAR VAL) pair. +otherwise do ELSE. -Note: binding is done according to `-let'." +Note: binding is done according to `-let'. + +\(fn (VAR VAL) THEN &rest ELSE)" (declare (debug ((sexp form) form body)) (indent 2)) `(-if-let* (,var-val) ,then ,@else)) @@ -1925,9 +1927,10 @@ encountered." (defmacro -when-let (var-val &rest body) "If VAL evaluates to non-nil, bind it to VAR and execute body. -VAR-VAL should be a (VAR VAL) pair. -Note: binding is done according to `-let'." +Note: binding is done according to `-let'. + +\(fn (VAR VAL) &rest BODY)" (declare (debug ((sexp form) body)) (indent 1)) `(-if-let ,var-val (progn ,@body)))