From: Stefan Monnier Date: Wed, 23 Apr 2014 02:22:06 +0000 (-0400) Subject: * lisp/simple.el (completion-list-mode-map): Use choose-completion for the X-Git-Tag: emacs-24.3.91~97 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0e8a93314941fbf1e8790cbe1f7d1e2069281b35;p=emacs.git * 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 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f3c94c1818d..04cb6e73e1c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,14 @@ 2014-04-23 Stefan Monnier + * 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). diff --git a/lisp/comint.el b/lisp/comint.el index 76b1d803877..00e193d642e 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -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) diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 8d4320669a1..86a16036e10 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el @@ -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) diff --git a/lisp/simple.el b/lisp/simple.el index a5e8381eaaa..61b7279568f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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 \\\\[choose-completion] in the completion list\ to select the completion near point. -Use \\\\[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")))))) diff --git a/lisp/term.el b/lisp/term.el index 97108c330a8..ce6125e2790 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -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)