diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-08-31 18:04:26 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-08-31 18:04:26 -0700 |
commit | 0e23ef9ddeefadcba94824c09e412c961de283e7 (patch) | |
tree | 8bd5c2973ce8d2f96b727b2eed8b4603a577a141 /lisp/gnus/message.el | |
parent | 5bf647499a5f6d08ac8aa4809ebce22acf1330b3 (diff) | |
download | emacs-0e23ef9ddeefadcba94824c09e412c961de283e7.tar.gz emacs-0e23ef9ddeefadcba94824c09e412c961de283e7.tar.bz2 emacs-0e23ef9ddeefadcba94824c09e412c961de283e7.zip |
Better seed support for (random).
* doc/lispref/numbers.texi (Random Numbers): Document new behavior of
the calls (random) and (random STRING).
* etc/NEWS: Document new behavior of (random), (random "string").
* lisp/play/5x5.el, lisp/play/animate.el, lisp/play/cookie1.el:
* lisp/play/dissociate.el, lisp/play/doctor.el, lisp/play/dunnet.el:
* lisp/play/gomoku.el, lisp/play/landmark.el, lisp/play/mpuz.el:
* lisp/play/tetris.el, lisp/play/zone.el:
* lisp/calc/calc-comb.el (math-init-random-base):
* lisp/play/blackbox.el (bb-init-board):
* lisp/play/life.el (life):
* lisp/server.el (server-use-tcp):
* lisp/type-break.el (type-break):
Remove unnecessary call to (random t).
* lisp/net/sasl.el (sasl-unique-id-function):
Change (random t) to (random), now that the latter is more random.
* lisp/play/life.el (life-initialized): Remove no-longer-needed var.
* lisp/gnus/gnus-sync.el (gnus-sync-lesync-setup):
* lisp/gnus/message.el (message-canlock-generate, message-unique-id):
Change (random t) to (random), now that the latter is more random.
* lisp/org/org-id.el (org-id-uuid):
Change (random t) to (random), now that the latter is more random.
* src/emacs.c (main): Call init_random.
* src/fns.c (Frandom): Set the seed from a string argument, if given.
Remove long-obsolete Gentzel cruft.
* src/lisp.h, src/sysdep.c (seed_random): Now takes address and size, not long.
(init_random): New function.
Diffstat (limited to 'lisp/gnus/message.el')
-rw-r--r-- | lisp/gnus/message.el | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 8fd89b1742c..18088423eb0 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4820,9 +4820,7 @@ Do not use this for anything important, it is cryptographically weak." (require 'sha1) (let (sha1-maximum-internal-length) (sha1 (concat (message-unique-id) - (format "%x%x%x" (random) - (progn (random t) (random)) - (random)) + (format "%x%x%x" (random) (random) (random)) (prin1-to-string (recent-keys)) (prin1-to-string (garbage-collect)))))) @@ -5525,7 +5523,6 @@ In posting styles use `(\"Expires\" (make-expires-date 30))'." ;; You might for example insert a "." somewhere (not next to another dot ;; or string boundary), or modify the "fsf" string. (defun message-unique-id () - (random t) ;; Don't use microseconds from (current-time), they may be unsupported. ;; Instead we use this randomly inited counter. (setq message-unique-id-char |