From f36f4e9e5c70a57fd682ca457324f1e79161f980 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 2 Mar 1994 23:26:06 +0000 Subject: [PATCH] (mouse-choose-completion): Use that as the buffer to edit. --- lisp/mouse.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/mouse.el b/lisp/mouse.el index 29f866019b2..fb49a2ced32 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1206,6 +1206,8 @@ and selects that window." choice) (save-excursion (set-buffer (window-buffer (posn-window (event-start event)))) + (if completion-reference-buffer + (setq buffer completion-reference-buffer)) (save-excursion (goto-char (posn-point (event-start event))) (skip-chars-backward "^ \t\n") @@ -1215,6 +1217,9 @@ and selects that window." (set-buffer buffer) (mouse-delete-max-match choice) (insert choice) + ;; Update point in the window that BUFFER is showing in. + (let ((window (get-buffer-window buffer t))) + (set-window-point window (point))) (and (equal buffer (window-buffer (minibuffer-window))) (minibuffer-complete-and-exit)))) -- 2.39.5