# HG changeset patch # User Paul Eggert # Date 744956057 0 # Node ID ed1f6abba5c54391e1adc71629a60c77d15d4113 # Parent db555f6edd6b755266143117f9747121d9bb2dd2 (isearch-ring-adjust1, isearch-ring-advance-edit): Replace `%' by `mod' and simplify. diff -r db555f6edd6b -r ed1f6abba5c5 lisp/isearch.el --- a/lisp/isearch.el Tue Aug 10 04:14:17 1993 +0000 +++ b/lisp/isearch.el Tue Aug 10 04:14:17 1993 +0000 @@ -4,7 +4,7 @@ ;; Author: Daniel LaLiberte -;; |$Date: 1993/07/15 03:46:02 $|$Revision: 1.46 $ +;; |$Date: 1993/07/31 18:39:09 $|$Revision: 1.47 $ ;; This file is not yet part of GNU Emacs, but it is based almost ;; entirely on isearch.el which is part of GNU Emacs. @@ -1090,9 +1090,9 @@ () (set yank-pointer-name (setq yank-pointer - (% (+ (or yank-pointer 0) - (if advance (1- length) 1)) - length))) + (mod (+ (or yank-pointer 0) + (if advance -1 1)) + length))) (setq isearch-string (nth yank-pointer ring) isearch-message (mapconcat 'isearch-text-char-description isearch-string ""))))) @@ -1134,11 +1134,8 @@ () (set yank-pointer-name (setq yank-pointer - (% (+ (or yank-pointer 0) - ;; Add LENGTH here to ensure a positive result. - length - (% (- n) length)) - length))) + (mod (- (or yank-pointer 0) n) + length))) (erase-buffer) (insert (nth yank-pointer ring))