diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/subr-x.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el index ba0ab6cb4c7..8d41f9298b5 100644 --- a/lisp/emacs-lisp/subr-x.el +++ b/lisp/emacs-lisp/subr-x.el @@ -128,9 +128,10 @@ binding value is nil. If all are non-nil, the value of THEN is returned, or the last form in ELSE is returned. Each element of VARLIST is a list (SYMBOL VALUEFORM) which binds -SYMBOL to the value of VALUEFORM). -An element can additionally be of the form (VALUEFORM), which is -evaluated and checked for nil." +SYMBOL to the value of VALUEFORM). An element can additionally +be of the form (VALUEFORM), which is evaluated and checked for +nil; i.e. SYMBOL can be omitted if only the test result is of +interest." (declare (indent 2) (debug ((&rest [&or symbolp (symbolp form) (sexp)]) form body))) @@ -139,7 +140,7 @@ evaluated and checked for nil." (if ,(caar (last varlist)) ,then ,@else)) - `(let* () ,@else))) + `(let* () ,then))) (defmacro when-let* (varlist &rest body) "Bind variables according to VARLIST and conditionally eval BODY. |