]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/simple.el (completion-list-mode-map): Use choose-completion for the
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 23 Apr 2014 02:22:06 +0000 (22:22 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 23 Apr 2014 02:22:06 +0000 (22:22 -0400)
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
lisp/ChangeLog
lisp/comint.el
lisp/progmodes/idlwave.el
lisp/simple.el
lisp/term.el

index f3c94c1818d7485cfce45da2d448b3767c39fc12..04cb6e73e1cfbab74b31b1eea4a2d954eb21af2a 100644 (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).
 
index 76b1d8038776969c6e1f10bc0a7495e4cc98e2c0..00e193d642e5512a5b6e65c138a9047bf9b5390a 100644 (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)
index 8d4320669a126d89d46727be5adda2c54818f7b0..86a16036e10c6d980037da9b11610b6d187ad559 100644 (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)
index a5e8381eaaaec3668f233497baf247fbc378677a..61b7279568f9ad4d85403e34d5af9bf456abffbb 100644 (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"))))))
index 97108c330a8e4e8be19f07095e6e8a2e9228da5e..ce6125e27900817418170e95a4aede760f16f330 100644 (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)