summaryrefslogtreecommitdiff
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-10-11 03:11:11 +0000
committerRichard M. Stallman <rms@gnu.org>1995-10-11 03:11:11 +0000
commitb61a81c2d83b4f52b92ae65e4fca666dd27e6652 (patch)
tree4ce95a9a24c9d82d8b2bf01b955dc712ce014ef0 /lisp/simple.el
parentda16d59923508785ad12e1aca61e70af8bbf8cd7 (diff)
downloademacs-b61a81c2d83b4f52b92ae65e4fca666dd27e6652.tar.gz
(next-completion): Specify the LIMIT arg when searching for text properties.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el17
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 9c362cf8e41..da201283d2c 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2832,22 +2832,25 @@ Go to the window from which completion was requested."
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 ()