; * lisp/subr.el (take-while): bytecode micro-optimisation

This commit is contained in:
Mattias Engdegård 2026-02-05 15:03:51 +01:00
parent a06cddec20
commit 893e0783c9

View file

@ -1148,8 +1148,8 @@ side-effects, and the argument LIST is not modified."
(make-symbol "f")))
(r (make-symbol "r")))
`(let (,@(and f `((,f ,pred)))
(,tail ,list)
(,r nil))
(,r nil)
(,tail ,list))
(while (and ,tail (funcall ,(or f pred) (car ,tail)))
(push (car ,tail) ,r)
(setq ,tail (cdr ,tail)))