diff options
| author | Richard M. Stallman | 1995-10-11 03:11:11 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-10-11 03:11:11 +0000 |
| commit | b61a81c2d83b4f52b92ae65e4fca666dd27e6652 (patch) | |
| tree | 4ce95a9a24c9d82d8b2bf01b955dc712ce014ef0 | |
| parent | da16d59923508785ad12e1aca61e70af8bbf8cd7 (diff) | |
| download | emacs-b61a81c2d83b4f52b92ae65e4fca666dd27e6652.tar.gz emacs-b61a81c2d83b4f52b92ae65e4fca666dd27e6652.zip | |
(next-completion): Specify the LIMIT arg when searching for text properties.
| -rw-r--r-- | lisp/simple.el | 17 |
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." | |||
| 2832 | WIth prefix argument N, move N items (negative N means move backward)." | 2832 | WIth prefix argument N, move N items (negative N means move backward)." |
| 2833 | (interactive "p") | 2833 | (interactive "p") |
| 2834 | (while (and (> n 0) (not (eobp))) | 2834 | (while (and (> n 0) (not (eobp))) |
| 2835 | (let ((prop (get-text-property (point) 'mouse-face))) | 2835 | (let ((prop (get-text-property (point) 'mouse-face)) |
| 2836 | (end (point-max))) | ||
| 2836 | ;; If in a completion, move to the end of it. | 2837 | ;; If in a completion, move to the end of it. |
| 2837 | (if prop | 2838 | (if prop |
| 2838 | (goto-char (next-single-property-change (point) 'mouse-face))) | 2839 | (goto-char (next-single-property-change (point) 'mouse-face nil end))) |
| 2839 | ;; Move to start of next one. | 2840 | ;; Move to start of next one. |
| 2840 | (goto-char (next-single-property-change (point) 'mouse-face))) | 2841 | (goto-char (next-single-property-change (point) 'mouse-face nil end))) |
| 2841 | (setq n (1- n))) | 2842 | (setq n (1- n))) |
| 2842 | (while (and (< n 0) (not (bobp))) | 2843 | (while (and (< n 0) (not (bobp))) |
| 2843 | (let ((prop (get-text-property (1- (point)) 'mouse-face))) | 2844 | (let ((prop (get-text-property (1- (point)) 'mouse-face)) |
| 2845 | (end (point-min))) | ||
| 2844 | ;; If in a completion, move to the start of it. | 2846 | ;; If in a completion, move to the start of it. |
| 2845 | (if prop | 2847 | (if prop |
| 2846 | (goto-char (previous-single-property-change (point) 'mouse-face))) | 2848 | (goto-char (previous-single-property-change |
| 2849 | (point) 'mouse-face nil end))) | ||
| 2847 | ;; Move to end of the previous completion. | 2850 | ;; Move to end of the previous completion. |
| 2848 | (goto-char (previous-single-property-change (point) 'mouse-face)) | 2851 | (goto-char (previous-single-property-change (point) 'mouse-face nil end)) |
| 2849 | ;; Move to the start of that one. | 2852 | ;; Move to the start of that one. |
| 2850 | (goto-char (previous-single-property-change (point) 'mouse-face))) | 2853 | (goto-char (previous-single-property-change (point) 'mouse-face nil end))) |
| 2851 | (setq n (1+ n)))) | 2854 | (setq n (1+ n)))) |
| 2852 | 2855 | ||
| 2853 | (defun choose-completion () | 2856 | (defun choose-completion () |