From cf47ea1bb93d0b4d72b92b1a64b0ca2e0f15d81e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 1 Aug 1993 20:50:07 +0000 Subject: (dissociated-press): Use `(random N)' instead of while loop. --- lisp/play/dissociate.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lisp/play') diff --git a/lisp/play/dissociate.el b/lisp/play/dissociate.el index 494d83b3b58..6939f320f79 100644 --- a/lisp/play/dissociate.el +++ b/lisp/play/dissociate.el @@ -88,9 +88,7 @@ Default is 2." (funcall move-function (- move-amount))) (point)))) - (let (ranval) - (while (< (setq ranval (random)) 0)) - (goto-char (1+ (% ranval (1- (point-max)))))) + (goto-char (1+ (random (1- (point-max))))) (or (funcall search-function overlap nil t) (let ((opoint (point))) (goto-char 1) -- cgit v1.2.1