aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert1993-08-10 04:14:17 +0000
committerPaul Eggert1993-08-10 04:14:17 +0000
commitffbc30b29a429e0f1ab2311792bbae2eeb97f359 (patch)
treebe34714b2d2e4c394b5b2c7c6c1e6eb043892786
parent47096a67ef28ca9cdc0d9612a9f846c76eaf55e4 (diff)
downloademacs-ffbc30b29a429e0f1ab2311792bbae2eeb97f359.tar.gz
emacs-ffbc30b29a429e0f1ab2311792bbae2eeb97f359.zip
(isearch-ring-adjust1, isearch-ring-advance-edit): Replace `%' by `mod' and simplify.
-rw-r--r--lisp/isearch.el15
1 files changed, 6 insertions, 9 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 77ce1aeb6b3..1def08ace63 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu> 5;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
6 6
7;; |$Date: 1993/07/15 03:46:02 $|$Revision: 1.46 $ 7;; |$Date: 1993/07/31 18:39:09 $|$Revision: 1.47 $
8 8
9;; This file is not yet part of GNU Emacs, but it is based almost 9;; This file is not yet part of GNU Emacs, but it is based almost
10;; entirely on isearch.el which is part of GNU Emacs. 10;; entirely on isearch.el which is part of GNU Emacs.
@@ -1090,9 +1090,9 @@ If you want to search for just a space, type C-q SPC."
1090 () 1090 ()
1091 (set yank-pointer-name 1091 (set yank-pointer-name
1092 (setq yank-pointer 1092 (setq yank-pointer
1093 (% (+ (or yank-pointer 0) 1093 (mod (+ (or yank-pointer 0)
1094 (if advance (1- length) 1)) 1094 (if advance -1 1))
1095 length))) 1095 length)))
1096 (setq isearch-string (nth yank-pointer ring) 1096 (setq isearch-string (nth yank-pointer ring)
1097 isearch-message (mapconcat 'isearch-text-char-description 1097 isearch-message (mapconcat 'isearch-text-char-description
1098 isearch-string ""))))) 1098 isearch-string "")))))
@@ -1134,11 +1134,8 @@ If you want to search for just a space, type C-q SPC."
1134 () 1134 ()
1135 (set yank-pointer-name 1135 (set yank-pointer-name
1136 (setq yank-pointer 1136 (setq yank-pointer
1137 (% (+ (or yank-pointer 0) 1137 (mod (- (or yank-pointer 0) n)
1138 ;; Add LENGTH here to ensure a positive result. 1138 length)))
1139 length
1140 (% (- n) length))
1141 length)))
1142 1139
1143 (erase-buffer) 1140 (erase-buffer)
1144 (insert (nth yank-pointer ring)) 1141 (insert (nth yank-pointer ring))