diff options
| author | Richard M. Stallman | 1993-08-12 22:21:12 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-08-12 22:21:12 +0000 |
| commit | 324710caf596ebf599be0376a53dfd4470400503 (patch) | |
| tree | f70d07282e38b6d6c2381ceef9e342ad20519ec9 | |
| parent | 3070929adb33aa100d7a99f8d72d93fb08c45b9b (diff) | |
| download | emacs-324710caf596ebf599be0376a53dfd4470400503.tar.gz emacs-324710caf596ebf599be0376a53dfd4470400503.zip | |
(mouse-choose-completion): Really go to minibuffer; no save-excursion.
| -rw-r--r-- | lisp/mouse.el | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index d59bc57e74d..f15cc0f2bc8 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -880,16 +880,15 @@ and selects that window." | |||
| 880 | (let ((beg (point))) | 880 | (let ((beg (point))) |
| 881 | (skip-chars-forward "^ \t\n") | 881 | (skip-chars-forward "^ \t\n") |
| 882 | (setq choice (buffer-substring beg (point)))))) | 882 | (setq choice (buffer-substring beg (point)))))) |
| 883 | (save-excursion | 883 | (set-buffer (window-buffer (minibuffer-window))) |
| 884 | (set-buffer (window-buffer (minibuffer-window))) | 884 | (goto-char (max (point-min) (- (point-max) (length choice)))) |
| 885 | (goto-char (max (point-min) (- (point-max) (length choice)))) | 885 | (while (and (not (eobp)) |
| 886 | (while (and (not (eobp)) | 886 | (let ((tail (buffer-substring (point) (point-max)))) |
| 887 | (let ((tail (buffer-substring (point) (point-max)))) | 887 | (not (string= tail (substring choice 0 (length tail)))))) |
| 888 | (not (string= tail (substring choice 0 (length tail)))))) | 888 | (forward-char 1)) |
| 889 | (forward-char 1)) | 889 | (insert choice) |
| 890 | (insert choice) | 890 | (delete-region (point) (point-max)) |
| 891 | (delete-region (point) (point-max)) | 891 | (minibuffer-complete-and-exit))) |
| 892 | (minibuffer-complete-and-exit)))) | ||
| 893 | 892 | ||
| 894 | ;; Font selection. | 893 | ;; Font selection. |
| 895 | 894 | ||