summaryrefslogtreecommitdiff
path: root/lisp/mouse.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mouse.el')
-rw-r--r--lisp/mouse.el19
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."
(let ((beg (point)))
(skip-chars-forward "^ \t\n")
(setq choice (buffer-substring beg (point))))))
- (save-excursion
- (set-buffer (window-buffer (minibuffer-window)))
- (goto-char (max (point-min) (- (point-max) (length choice))))
- (while (and (not (eobp))
- (let ((tail (buffer-substring (point) (point-max))))
- (not (string= tail (substring choice 0 (length tail))))))
- (forward-char 1))
- (insert choice)
- (delete-region (point) (point-max))
- (minibuffer-complete-and-exit))))
+ (set-buffer (window-buffer (minibuffer-window)))
+ (goto-char (max (point-min) (- (point-max) (length choice))))
+ (while (and (not (eobp))
+ (let ((tail (buffer-substring (point) (point-max))))
+ (not (string= tail (substring choice 0 (length tail))))))
+ (forward-char 1))
+ (insert choice)
+ (delete-region (point) (point-max))
+ (minibuffer-complete-and-exit)))
;; Font selection.