[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 62112a7 6/6: Merge from origin/emacs-26
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] master 62112a7 6/6: Merge from origin/emacs-26 |
Date: |
Thu, 20 Dec 2018 10:55:31 -0500 (EST) |
branch: master
commit 62112a77f191c0b00aa420ce2d0fee8aa03592bf
Merge: 1e5f848 081fb69
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>
Merge from origin/emacs-26
081fb69 (origin/emacs-26) Check result from c-backward-token-2 to avo...
f4ea746 cl-make-random-state was not copying its arg
---
lisp/emacs-lisp/cl-extra.el | 2 +-
lisp/progmodes/cc-fonts.el | 4 ++--
test/lisp/emacs-lisp/cl-extra-tests.el | 5 +++++
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index 78484fc..7d530de 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -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.
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index 2e85924..e91e54d 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -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.
diff --git a/test/lisp/emacs-lisp/cl-extra-tests.el
b/test/lisp/emacs-lisp/cl-extra-tests.el
index baad8eb..fe59703 100644
--- a/test/lisp/emacs-lisp/cl-extra-tests.el
+++ b/test/lisp/emacs-lisp/cl-extra-tests.el
@@ -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
- [Emacs-diffs] master updated (f68f2eb -> 62112a7), Glenn Morris, 2018/12/20
- [Emacs-diffs] master eece51e 1/6: ; Merge from origin/emacs-26, Glenn Morris, 2018/12/20
- [Emacs-diffs] master 46e22ae 3/6: ; Merge from origin/emacs-26, Glenn Morris, 2018/12/20
- [Emacs-diffs] master 9cce037 2/6: Merge from origin/emacs-26, Glenn Morris, 2018/12/20
- [Emacs-diffs] master 62112a7 6/6: Merge from origin/emacs-26,
Glenn Morris <=
- [Emacs-diffs] master 1e5f848 5/6: ; Merge from origin/emacs-26, Glenn Morris, 2018/12/20
- [Emacs-diffs] master 81cac3e9 4/6: Merge from origin/emacs-26, Glenn Morris, 2018/12/20