From 5b9cc1508e80e7e39ffea0395c1e9128405514dc Mon Sep 17 00:00:00 2001 From: Mark Oteiza Date: Mon, 18 Jun 2018 21:27:26 -0400 Subject: [PATCH] Change errant if to when (Bug#31840) * lisp/emacs-lisp/subr-x.el: Expand to 'when' instead of 'if'. --- lisp/emacs-lisp/subr-x.el | 4 ++-- 1 file 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) -- 2.39.5