changeset 4511:db555f6edd6b

(current-kill): Replace (% (+ N (- L K)) L) with (mod (- N K) L), which is simpler.
author Paul Eggert <eggert@twinsun.com>
date Tue, 10 Aug 1993 04:14:17 +0000
parents 10baf5e7550f
children ed1f6abba5c5
files lisp/simple.el
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Tue Aug 10 04:14:17 1993 +0000
+++ b/lisp/simple.el	Tue Aug 10 04:14:17 1993 +0000
@@ -998,11 +998,10 @@
 	    (kill-new interprogram-paste))
 	  interprogram-paste)
       (or kill-ring (error "Kill ring is empty"))
-      (let* ((length (length kill-ring))
-	     (ARGth-kill-element
-	      (nthcdr (% (+ n (- length (length kill-ring-yank-pointer)))
-			 length)
-		      kill-ring)))
+      (let ((ARGth-kill-element
+	     (nthcdr (mod (- n (length kill-ring-yank-pointer))
+			  (length kill-ring))
+		     kill-ring)))
 	(or do-not-move
 	    (setq kill-ring-yank-pointer ARGth-kill-element))
 	(car ARGth-kill-element)))))