Commit 47096a67 authored by Paul Eggert's avatar Paul Eggert
Browse files

(current-kill): Replace (% (+ N (- L K)) L) with (mod (- N K) L),

which is simpler.
parent 9b1868cc
......@@ -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)))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment