]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/subr.el (copy-tree): Handle vector in cdr. (Bug#24876)
authorJohan Bockgård <bojohan@gnu.org>
Sat, 5 Nov 2016 15:31:22 +0000 (16:31 +0100)
committerJohan Bockgård <bojohan@gnu.org>
Sat, 5 Nov 2016 15:36:12 +0000 (16:36 +0100)
lisp/subr.el

index ebcb1fd4b82635df2c2f90143952ff808c68028e..a713b92c6cdf6db9c6b7ae40092c7f273470e429 100644 (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)