diff options
| author | Paul Eggert | 1993-08-10 04:14:17 +0000 |
|---|---|---|
| committer | Paul Eggert | 1993-08-10 04:14:17 +0000 |
| commit | 47096a67ef28ca9cdc0d9612a9f846c76eaf55e4 (patch) | |
| tree | f9cfb0cbc5353fad8da54abd662a2c5e183757ae | |
| parent | 9b1868cc53647203c645f1633fb71e53c5f74334 (diff) | |
| download | emacs-47096a67ef28ca9cdc0d9612a9f846c76eaf55e4.tar.gz emacs-47096a67ef28ca9cdc0d9612a9f846c76eaf55e4.zip | |
(current-kill): Replace (% (+ N (- L K)) L) with (mod (- N K) L),
which is simpler.
| -rw-r--r-- | lisp/simple.el | 9 |
1 files 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." | |||
| 998 | (kill-new interprogram-paste)) | 998 | (kill-new interprogram-paste)) |
| 999 | interprogram-paste) | 999 | interprogram-paste) |
| 1000 | (or kill-ring (error "Kill ring is empty")) | 1000 | (or kill-ring (error "Kill ring is empty")) |
| 1001 | (let* ((length (length kill-ring)) | 1001 | (let ((ARGth-kill-element |
| 1002 | (ARGth-kill-element | 1002 | (nthcdr (mod (- n (length kill-ring-yank-pointer)) |
| 1003 | (nthcdr (% (+ n (- length (length kill-ring-yank-pointer))) | 1003 | (length kill-ring)) |
| 1004 | length) | 1004 | kill-ring))) |
| 1005 | kill-ring))) | ||
| 1006 | (or do-not-move | 1005 | (or do-not-move |
| 1007 | (setq kill-ring-yank-pointer ARGth-kill-element)) | 1006 | (setq kill-ring-yank-pointer ARGth-kill-element)) |
| 1008 | (car ARGth-kill-element))))) | 1007 | (car ARGth-kill-element))))) |