* lisp/simple.el (completion-list-mode-map): Use choose-completion for the

mouse binding as well.
(completion-list-mode, completion-setup-function): Adjust docstring and
echo area message accordingly.
* lisp/progmodes/idlwave.el (idlwave-choose-completion): Adjust to new
calling convention of choose-completion.
* lisp/comint.el (comint-dynamic-list-completions):
* lisp/term.el (term-dynamic-list-completions): Accept choose-completion.

Fixes: debbugs:17302
This commit is contained in:
Stefan Monnier 2014-04-22 22:22:06 -04:00
parent c08684513a
commit 0e8a933149
5 changed files with 19 additions and 9 deletions

View file

@ -1,5 +1,14 @@
2014-04-23 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (completion-list-mode-map): Use choose-completion for the
mouse binding as well (bug#17302).
(completion-list-mode, completion-setup-function): Adjust docstring and
echo area message accordingly.
* progmodes/idlwave.el (idlwave-choose-completion): Adjust to new
calling convention of choose-completion.
* comint.el (comint-dynamic-list-completions):
* term.el (term-dynamic-list-completions): Accept choose-completion.
* progmodes/perl-mode.el (perl-syntax-propertize-function): Slash after
&, |, +, - and * can't be a division (bug#17317).

View file

@ -3326,8 +3326,9 @@ the completions."
(and (consp first) (consp (event-start first))
(eq (window-buffer (posn-window (event-start first)))
(get-buffer "*Completions*"))
(eq (key-binding key) 'mouse-choose-completion)))
;; If the user does mouse-choose-completion with the mouse,
(memq (key-binding key)
'(mouse-choose-completion choose-completion))))
;; If the user does choose-completion with the mouse,
;; execute the command, then delete the completion window.
(progn
(choose-completion first)

View file

@ -7170,7 +7170,7 @@ If these don't exist, a letter in the string is automatically selected."
(defun idlwave-choose-completion (&rest args)
"Choose the completion that point is in or next to."
(interactive)
(interactive (list last-nonmenu-event))
(apply 'idlwave-choose 'choose-completion args))
(defun idlwave-mouse-choose-completion (&rest args)

View file

@ -6870,7 +6870,7 @@ With a prefix argument, set VARIABLE to VALUE buffer-locally."
(defvar completion-list-mode-map
(let ((map (make-sparse-keymap)))
(define-key map [mouse-2] 'mouse-choose-completion)
(define-key map [mouse-2] 'choose-completion)
(define-key map [follow-link] 'mouse-face)
(define-key map [down-mouse-2] nil)
(define-key map "\C-m" 'choose-completion)
@ -7119,8 +7119,7 @@ back on `completion-list-insert-choice-function' when nil."
"Major mode for buffers showing lists of possible completions.
Type \\<completion-list-mode-map>\\[choose-completion] in the completion list\
to select the completion near point.
Use \\<completion-list-mode-map>\\[mouse-choose-completion] to select one\
with the mouse.
Or click to select one with the mouse.
\\{completion-list-mode-map}"
(set (make-local-variable 'completion-base-size) nil))
@ -7178,7 +7177,7 @@ Called from `temp-buffer-show-hook'."
(goto-char (point-min))
(if (display-mouse-p)
(insert (substitute-command-keys
"Click \\[mouse-choose-completion] on a completion to select it.\n")))
"Click on a completion to select it.\n")))
(insert (substitute-command-keys
"In this buffer, type \\[choose-completion] to \
select the completion near point.\n\n"))))))

View file

@ -4137,8 +4137,9 @@ Typing SPC flushes the help buffer."
(and (consp first)
(eq (window-buffer (posn-window (event-start first)))
(get-buffer "*Completions*"))
(eq (key-binding key) 'mouse-choose-completion)))
;; If the user does mouse-choose-completion with the mouse,
(memq (key-binding key)
'(mouse-choose-completion choose-completion))))
;; If the user does choose-completion with the mouse,
;; execute the command, then delete the completion window.
(progn
(choose-completion first)