changeset 13171:ed9465203ed6

(next-completion): Specify the LIMIT arg when searching for text properties.
author Richard M. Stallman <rms@gnu.org>
date Wed, 11 Oct 1995 03:11:11 +0000
parents 7fd22a2485f2
children 219ce06d0e63
files lisp/simple.el
diffstat 1 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Tue Oct 10 20:03:31 1995 +0000
+++ b/lisp/simple.el	Wed Oct 11 03:11:11 1995 +0000
@@ -2832,22 +2832,25 @@
 WIth prefix argument N, move N items (negative N means move backward)."
   (interactive "p")
   (while (and (> n 0) (not (eobp)))
-    (let ((prop (get-text-property (point) 'mouse-face)))
+    (let ((prop (get-text-property (point) 'mouse-face))
+	  (end (point-max)))
       ;; If in a completion, move to the end of it.
       (if prop
-	  (goto-char (next-single-property-change (point) 'mouse-face)))
+	  (goto-char (next-single-property-change (point) 'mouse-face nil end)))
       ;; Move to start of next one.
-      (goto-char (next-single-property-change (point) 'mouse-face)))
+      (goto-char (next-single-property-change (point) 'mouse-face nil end)))
     (setq n (1- n)))
   (while (and (< n 0) (not (bobp)))
-    (let ((prop (get-text-property (1- (point)) 'mouse-face)))
+    (let ((prop (get-text-property (1- (point)) 'mouse-face))
+	  (end (point-min)))
       ;; If in a completion, move to the start of it.
       (if prop
-	  (goto-char (previous-single-property-change (point) 'mouse-face)))
+	  (goto-char (previous-single-property-change
+		      (point) 'mouse-face nil end)))
       ;; Move to end of the previous completion.
-      (goto-char (previous-single-property-change (point) 'mouse-face))
+      (goto-char (previous-single-property-change (point) 'mouse-face nil end))
       ;; Move to the start of that one.
-      (goto-char (previous-single-property-change (point) 'mouse-face)))
+      (goto-char (previous-single-property-change (point) 'mouse-face nil end)))
     (setq n (1+ n))))
 
 (defun choose-completion ()