Ensure doplist! has no side effects

This commit is contained in:
Henrik Lissner 2019-10-26 01:46:32 -04:00
parent a78e89bbf8
commit 7c54478335
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -11,7 +11,7 @@ Evaluate BODY with either ARGLIST bound to (cons PROP VAL) or, if ARGLIST is a
list, the pair is destructured into (CAR . CDR)." list, the pair is destructured into (CAR . CDR)."
(declare (indent defun)) (declare (indent defun))
(let ((plist-var (make-symbol "plist"))) (let ((plist-var (make-symbol "plist")))
`(let ((,plist-var ,plist)) `(let ((,plist-var (copy-sequence ,plist)))
(while ,plist-var (while ,plist-var
(let ,(if (listp arglist) (let ,(if (listp arglist)
`((,(pop arglist) (pop ,plist-var)) `((,(pop arglist) (pop ,plist-var))