1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00

* lisp/subr.el (copy-tree): Handle vector in cdr. (Bug#24876)

This commit is contained in:
Johan Bockgård 2016-11-05 16:31:22 +01:00
parent f95bf3cd1f
commit de75a1154e

View file

@ -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)