From: Johan Bockgård Date: Sat, 5 Nov 2016 15:31:22 +0000 (+0100) Subject: * lisp/subr.el (copy-tree): Handle vector in cdr. (Bug#24876) X-Git-Tag: emacs-26.0.90~1363 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=de75a1154e9dad334ff1359d7f606c66b2fd2233;p=emacs.git * lisp/subr.el (copy-tree): Handle vector in cdr. (Bug#24876) --- diff --git a/lisp/subr.el b/lisp/subr.el index ebcb1fd4b82..a713b92c6cd 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -514,7 +514,8 @@ argument VECP, this copies vectors as well as conses." (setq newcar (copy-tree (car tree) vecp))) (push newcar result)) (setq tree (cdr tree))) - (nconc (nreverse result) tree)) + (nconc (nreverse result) + (if (and vecp (vectorp tree)) (copy-tree tree vecp) tree))) (if (and vecp (vectorp tree)) (let ((i (length (setq tree (copy-sequence tree))))) (while (>= (setq i (1- i)) 0)