]> git.eshelyaron.com Git - emacs.git/commitdiff
(mouse-choose-completion): Use that as the buffer to edit.
authorRichard M. Stallman <rms@gnu.org>
Wed, 2 Mar 1994 23:26:06 +0000 (23:26 +0000)
committerRichard M. Stallman <rms@gnu.org>
Wed, 2 Mar 1994 23:26:06 +0000 (23:26 +0000)
lisp/mouse.el

index 29f866019b2785583934144eac53207601236edb..fb49a2ced32660461b3c9118f5cacb7a7a799fde 100644 (file)
@@ -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))))
 \f