aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-11-03 11:36:09 -0700
committerGlenn Morris2012-11-03 11:36:09 -0700
commit376a8e83bb3438f77dadf2d9910ef7baabcc82c2 (patch)
treeb7cedb8427bbd114b6fa4d9352a5b4d7b3974365
parent0b3d4a4756646cc7e908375a457e36e15712ad00 (diff)
downloademacs-376a8e83bb3438f77dadf2d9910ef7baabcc82c2.tar.gz
emacs-376a8e83bb3438f77dadf2d9910ef7baabcc82c2.zip
Rename cl-random-time to cl--random-time
* emacs-lisp/cl-lib.el (cl--random-time): Rename from cl-random-time. (cl--gensym-counter, cl--random-state): Update callers. * emacs-lisp/cl-extra.el (cl-make-random-state): Update callers. Fixes: debbugs:12773
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/emacs-lisp/cl-extra.el2
-rw-r--r--lisp/emacs-lisp/cl-lib.el6
3 files changed, 11 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d040d331903..4d2f7e766cf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12012-11-03 Glenn Morris <rgm@gnu.org>
2
3 * emacs-lisp/cl-lib.el (cl--random-time):
4 Rename from cl-random-time. (Bug#12773)
5 (cl--gensym-counter, cl--random-state): Update callers.
6 * emacs-lisp/cl-extra.el (cl-make-random-state): Update callers.
7
12012-11-03 Chong Yidong <cyd@gnu.org> 82012-11-03 Chong Yidong <cyd@gnu.org>
2 9
3 * cus-start.el: Make cursor-type customizable (Bug#11633). 10 * cus-start.el: Make cursor-type customizable (Bug#11633).
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index c72e3342648..a57de344cf3 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -440,7 +440,7 @@ If STATE is t, return a new state object seeded from the time of day."
440 (cond ((null state) (cl-make-random-state cl--random-state)) 440 (cond ((null state) (cl-make-random-state cl--random-state))
441 ((vectorp state) (copy-tree state t)) 441 ((vectorp state) (copy-tree state t))
442 ((integerp state) (vector 'cl-random-state-tag -1 30 state)) 442 ((integerp state) (vector 'cl-random-state-tag -1 30 state))
443 (t (cl-make-random-state (cl-random-time))))) 443 (t (cl-make-random-state (cl--random-time)))))
444 444
445;;;###autoload 445;;;###autoload
446(defun cl-random-state-p (object) 446(defun cl-random-state-p (object)
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index 122402797e1..034a5c7517e 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -264,12 +264,12 @@ one value.
264 264
265;;; Symbols. 265;;; Symbols.
266 266
267(defun cl-random-time () 267(defun cl--random-time ()
268 (let* ((time (copy-sequence (current-time-string))) (i (length time)) (v 0)) 268 (let* ((time (copy-sequence (current-time-string))) (i (length time)) (v 0))
269 (while (>= (cl-decf i) 0) (setq v (+ (* v 3) (aref time i)))) 269 (while (>= (cl-decf i) 0) (setq v (+ (* v 3) (aref time i))))
270 v)) 270 v))
271 271
272(defvar cl--gensym-counter (* (logand (cl-random-time) 1023) 100)) 272(defvar cl--gensym-counter (* (logand (cl--random-time) 1023) 100))
273 273
274 274
275;;; Numbers. 275;;; Numbers.
@@ -296,7 +296,7 @@ always returns nil."
296 "Return t if INTEGER is even." 296 "Return t if INTEGER is even."
297 (eq (logand integer 1) 0)) 297 (eq (logand integer 1) 0))
298 298
299(defvar cl--random-state (vector 'cl-random-state-tag -1 30 (cl-random-time))) 299(defvar cl--random-state (vector 'cl-random-state-tag -1 30 (cl--random-time)))
300 300
301(defconst cl-most-positive-float nil 301(defconst cl-most-positive-float nil
302 "The largest value that a Lisp float can hold. 302 "The largest value that a Lisp float can hold.