]> git.eshelyaron.com Git - emacs.git/commitdiff
(mouse-choose-completion): Actually choose that alternative,
authorRichard M. Stallman <rms@gnu.org>
Sat, 31 Jul 1993 05:31:58 +0000 (05:31 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 31 Jul 1993 05:31:58 +0000 (05:31 +0000)
don't just insert its name.

lisp/mouse.el

index b3ce6da6688f82b070b3d25d4d43a077cb52795d..904227727e90ca9d22717c9cfe4f8c23167ebd4e 100644 (file)
@@ -843,6 +843,7 @@ and selects that window."
 ;; Choose a completion with the mouse.
 
 (defun mouse-choose-completion (event)
+  "Click on an alternative in the `*Completions*' buffer to choose it."
   (interactive "e")
   (let (choice)
     (save-excursion
@@ -861,7 +862,8 @@ and selects that window."
                    (not (string= tail (substring choice 0 (length tail))))))
        (forward-char 1))
       (insert choice)
-      (delete-region (point) (point-max)))))
+      (delete-region (point) (point-max))
+      (minibuffer-complete-and-exit))))
 \f
 ;; Font selection.