From: Paul Eggert Date: Tue, 10 Aug 1993 04:14:17 +0000 (+0000) Subject: (current-kill): Replace (% (+ N (- L K)) L) with (mod (- N K) L), X-Git-Tag: emacs-19.34~11340 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=47096a67ef28ca9cdc0d9612a9f846c76eaf55e4;p=emacs.git (current-kill): Replace (% (+ N (- L K)) L) with (mod (- N K) L), which is simpler. --- diff --git a/lisp/simple.el b/lisp/simple.el index a0ae2f3eeaa..58edc738d1f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -998,11 +998,10 @@ yanking point; just return the Nth kill forward." (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)))))