From 47096a67ef28ca9cdc0d9612a9f846c76eaf55e4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 10 Aug 1993 04:14:17 +0000 Subject: [PATCH] (current-kill): Replace (% (+ N (- L K)) L) with (mod (- N K) L), which is simpler. --- lisp/simple.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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))))) -- 2.39.5