changeset 4371:fb0e37e7afae

(mouse-choose-completion): Actually choose that alternative, don't just insert its name.
author Richard M. Stallman <rms@gnu.org>
date Sat, 31 Jul 1993 05:31:58 +0000
parents 605e06926c35
children 189b84c7dbc5
files lisp/mouse.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mouse.el	Sat Jul 31 01:40:35 1993 +0000
+++ b/lisp/mouse.el	Sat Jul 31 05:31:58 1993 +0000
@@ -843,6 +843,7 @@
 ;; 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 @@
 		    (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))))
 
 ;; Font selection.