don't just insert its name.
;; 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
(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.