]> git.eshelyaron.com Git - emacs.git/commitdiff
Change errant if to when (Bug#31840)
authorMark Oteiza <mvoteiza@udel.edu>
Tue, 19 Jun 2018 01:27:26 +0000 (21:27 -0400)
committerMark Oteiza <mvoteiza@udel.edu>
Tue, 19 Jun 2018 01:27:26 +0000 (21:27 -0400)
* lisp/emacs-lisp/subr-x.el: Expand to 'when' instead of 'if'.

lisp/emacs-lisp/subr-x.el

index 7fab9083e8545bbccd7136a59c1edd09a16fbee8..e03a81c892a0551fadfcfbf203dc4e2c8eca5160 100644 (file)
@@ -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)