浏览代码

Revert "org-compat.el: New compatibility function `org-random'"

This reverts commit 7719734dd7b216e29ee7f5be5077d13004903a7d.

* lisp/org-id.el: Do not use (random t), we just want a new random
  number, not a re-seeding of the PRNG for which (random t) doesn't
  provide enough entropy anyway.  Even if (random) would always
  produce the same sequence, the other components going into the MD5
  hash ensure that the result will be unique.
Achim Gratz 12 年之前
父节点
当前提交
c5977e7e9d
共有 2 个文件被更改,包括 1 次插入7 次删除
  1. 0 6
      lisp/org-compat.el
  2. 1 1
      lisp/org-id.el

+ 0 - 6
lisp/org-compat.el

@@ -460,12 +460,6 @@ With two arguments, return floor and remainder of their quotient."
 	   (defun org-release () "N/A")
 	   (defun org-git-version () "N/A !!check installation!!"))))))
 
-(defun org-random ()
-  "Call ̀random' appropriately."
-  (if (or (featurep 'xemacs) (version< emacs-version "24.2.50.1"))
-      (random t)
-    (random)))
-
 (provide 'org-compat)
 
 ;;; org-compat.el ends here

+ 1 - 1
lisp/org-id.el

@@ -317,7 +317,7 @@ So a typical ID could look like \"Org:4nd91V40HI\"."
 (defun org-id-uuid ()
   "Return string with random (version 4) UUID."
   (let ((rnd (md5 (format "%s%s%s%s%s%s%s"
-			  (org-random)
+			  (random)
 			  (current-time)
 			  (user-uid)
 			  (emacs-pid)