summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/subr-x.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/subr-x.el')
-rw-r--r--lisp/emacs-lisp/subr-x.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index 7fab9083e85..e03a81c892a 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -152,8 +152,8 @@ are non-nil, then the result is non-nil."
(let (res)
(if varlist
`(let* ,(setq varlist (internal--build-bindings varlist))
- (if ,(setq res (caar (last varlist)))
- ,@(or body `(,res))))
+ (when ,(setq res (caar (last varlist)))
+ ,@(or body `(,res))))
`(let* () ,@(or body '(t))))))
(defmacro if-let (spec then &rest else)