diff options
author | Joakim Verona <joakim@verona.se> | 2012-05-21 00:37:29 +0200 |
---|---|---|
committer | Joakim Verona <joakim@verona.se> | 2012-05-21 00:37:29 +0200 |
commit | 74f082445c1dd0c92d5bb187db0d50287e3a7bae (patch) | |
tree | 48e3d8fd9df3876665654eab9bcf96ec492a31e9 /lisp/emacs-lisp/cl-extra.el | |
parent | 52862ad482e030e4d54cd7d6e250d76e59ee0554 (diff) | |
parent | 1b170bc63c2f3a3fbe6ba6996d5a015e82634909 (diff) | |
download | emacs-74f082445c1dd0c92d5bb187db0d50287e3a7bae.tar.gz emacs-74f082445c1dd0c92d5bb187db0d50287e3a7bae.tar.bz2 emacs-74f082445c1dd0c92d5bb187db0d50287e3a7bae.zip |
upstream, fix conflicts
Diffstat (limited to 'lisp/emacs-lisp/cl-extra.el')
-rw-r--r-- | lisp/emacs-lisp/cl-extra.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 9ac5ce7d2f0..420480d16ea 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -1,6 +1,6 @@ ;;; cl-extra.el --- Common Lisp features, part 2 -;; Copyright (C) 1993, 2000-2012 Free Software Foundation, Inc. +;; Copyright (C) 1993, 2000-2012 Free Software Foundation, Inc. ;; Author: Dave Gillespie <daveg@synaptics.com> ;; Keywords: extensions @@ -430,12 +430,11 @@ With two arguments, return rounding and remainder of their quotient." ;; Random numbers. -(defvar *random-state*) ;;;###autoload (defun random* (lim &optional state) "Return a random nonnegative number less than LIM, an integer or float. Optional second arg STATE is a random-state object." - (or state (setq state *random-state*)) + (or state (setq state cl--random-state)) ;; Inspired by "ran3" from Numerical Recipes. Additive congruential method. (let ((vec (aref state 3))) (if (integerp vec) @@ -458,9 +457,9 @@ Optional second arg STATE is a random-state object." ;;;###autoload (defun make-random-state (&optional state) - "Return a copy of random-state STATE, or of `*random-state*' if omitted. + "Return a copy of random-state STATE, or of the internal state if omitted. If STATE is t, return a new state object seeded from the time of day." - (cond ((null state) (make-random-state *random-state*)) + (cond ((null state) (make-random-state cl--random-state)) ((vectorp state) (cl-copy-tree state t)) ((integerp state) (vector 'cl-random-state-tag -1 30 state)) (t (make-random-state (cl-random-time))))) |