Merge from origin/emacs-26
081fb69(origin/emacs-26) Check result from c-backward-token-2 to avo...f4ea746cl-make-random-state was not copying its arg
This commit is contained in:
commit
62112a77f1
3 changed files with 8 additions and 3 deletions
|
|
@ -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."
|
|||
(save-excursion
|
||||
(goto-char match-pos)
|
||||
(while
|
||||
(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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue