summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorJohan Bockgård <bojohan@gnu.org>2016-11-05 16:31:22 +0100
committerJohan Bockgård <bojohan@gnu.org>2016-11-05 16:36:12 +0100
commitde75a1154e9dad334ff1359d7f606c66b2fd2233 (patch)
tree0f08e9bf7476e25c0c871b98faf8faa551281eae /lisp/subr.el
parentf95bf3cd1f55cf8f99b88c7318c21c967b11dfd1 (diff)
downloademacs-de75a1154e9dad334ff1359d7f606c66b2fd2233.tar.gz
* lisp/subr.el (copy-tree): Handle vector in cdr. (Bug#24876)
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el3
1 files changed, 2 insertions, 1 deletions
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)