diff options
author | Damien Elmes <emms@repose.cx> | 2006-10-11 15:15:00 +0000 |
---|---|---|
committer | Damien Elmes <emms@repose.cx> | 2006-10-11 15:15:00 +0000 |
commit | 59afb287740909c01497948cb72064deb136ced0 (patch) | |
tree | 393acc87b48c7ae46ae21dea1183499db70de83e | |
parent | 088a174bf4f6d515bc2a30e86f8624042a3171e2 (diff) |
browser: ensure the RNG is seeded before use
darcs-hash:20061011151535-4e3e3-d1c70d60b24a467a346f16c8423fd2812a1378ed.gz
-rw-r--r-- | emms-browser.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/emms-browser.el b/emms-browser.el index da6ab47..78bde72 100644 --- a/emms-browser.el +++ b/emms-browser.el @@ -1209,8 +1209,14 @@ Return the previous point-max before adding." (emms-browser-pop-mark) (recenter '(4))) +(defvar emms-browser-seed-pending t + "Do we need to seed (random)?") + (defun emms-browser-goto-random () (interactive) + (when emms-browser-seed-pending + (random t) + (setq emms-browser-seed-pending nil)) (goto-line (random (count-lines (point-min) (point-max))))) (defun emms-browser-view-in-dired (&optional bdata) |