summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-12-19 13:42:21 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2018-12-19 13:42:47 -0800
commitf4ea7464516b22409f429e98595b97cbf8220f4c (patch)
tree8b48a82e1d3c11ce7629e553df614ec453ec332a /lisp/emacs-lisp
parentfda43a7bef499024fa5fcb32432e76c5839ee154 (diff)
downloademacs-f4ea7464516b22409f429e98595b97cbf8220f4c.tar.gz
emacs-f4ea7464516b22409f429e98595b97cbf8220f4c.tar.bz2
emacs-f4ea7464516b22409f429e98595b97cbf8220f4c.zip
cl-make-random-state was not copying its arg
Problem reported by Xu Chunyang (Bug#33731). * lisp/emacs-lisp/cl-extra.el (cl-make-random-state): Use copy-sequence, not copy-tree, so that the record is copied. * test/lisp/emacs-lisp/cl-extra-tests.el: (cl-extra-test-cl-make-random-state): New test.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/cl-extra.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index 36b65f97b07..c38b4957fc7 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -484,7 +484,7 @@ Optional second arg STATE is a random-state object."
If STATE is t, return a new state object seeded from the time of day."
(unless state (setq state cl--random-state))
(if (cl-random-state-p state)
- (copy-tree state t)
+ (copy-sequence state)
(cl--make-random-state (if (integerp state) state (cl--random-time)))))
;; Implementation limits.