Commit 62112a77 authored by Glenn Morris's avatar Glenn Morris

Merge from origin/emacs-26

081fb694 (origin/emacs-26) Check result from c-backward-token-2 to avo...
f4ea7464 cl-make-random-state was not copying its arg
parents 1e5f8480 081fb694
Pipeline #342 failed with stage
in 10 seconds
......@@ -482,7 +482,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.
......@@ -1255,8 +1255,8 @@ casts and declarations are fontified. Used on level 2 and higher."
(goto-char match-pos)
(progn (c-backward-token-2)
(eq (char-after) ?\()))
(and (zerop (c-backward-token-2))
(eq (char-after) ?\()))
(looking-at c-arithmetic-op-regexp)))
(cons nil nil))
;; In a C++ member initialization list.
......@@ -94,4 +94,9 @@
(should (equal (list lst3 (cdr lst3) (cddr lst3))
(cl-maplist fn3 lst lst2 lst3)))))
(ert-deftest cl-extra-test-cl-make-random-state ()
(let ((s (cl-make-random-state)))
;; Test for Bug#33731.
(should-not (eq s (cl-make-random-state s)))))
;;; cl-extra-tests.el ends here
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment