# HG changeset patch # User Richard M. Stallman # Date 813381071 0 # Node ID ed9465203ed6b52514122e3f58f8747fcba6faa7 # Parent 7fd22a2485f2663103a2835f7d393d0e67a25abd (next-completion): Specify the LIMIT arg when searching for text properties. diff -r 7fd22a2485f2 -r ed9465203ed6 lisp/simple.el --- 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 ()