mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
; * lisp/subr.el (and-let*): Expand to 'and' not 'when'.
This commit is contained in:
parent
0903fe3ac0
commit
f680b988c2
1 changed files with 3 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue