From f680b988c2d7123f5159bb1a6a645f62166ab282 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 20 Feb 2026 12:33:25 +0000 Subject: [PATCH] ; * lisp/subr.el (and-let*): Expand to 'and' not 'when'. --- lisp/subr.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 6f2dcb8c16d..380c7bcea99 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2874,11 +2874,11 @@ for forms evaluated for side-effect with returned values ignored." ;; both `when-let*' and `and-let*' (in addition to the additional ;; feature of `and-let*' when BODY is empty). (declare (indent 1) (debug if-let*)) - (let (res) + (let (res (body* (macroexp-progn body))) (if varlist `(let* ,(setq varlist (internal--build-bindings varlist)) - (when ,(setq res (caar (last varlist))) - ,@(or body `(,res)))) + ,(progn (setq res (caar (last varlist))) + (if body* `(and ,res ,body*) res))) `(let* () ,@(or body '(t)))))) (defmacro if-let (spec then &rest else)