aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2014-04-22 22:22:06 -0400
committerStefan Monnier2014-04-22 22:22:06 -0400
commit0e8a93314941fbf1e8790cbe1f7d1e2069281b35 (patch)
tree7b0cdd683cacad9c2664d5a070409d639f32b10e
parentc08684513a37f787a540033a6e543326c9631d37 (diff)
downloademacs-0e8a93314941fbf1e8790cbe1f7d1e2069281b35.tar.gz
emacs-0e8a93314941fbf1e8790cbe1f7d1e2069281b35.zip
* 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
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/comint.el5
-rw-r--r--lisp/progmodes/idlwave.el2
-rw-r--r--lisp/simple.el7
-rw-r--r--lisp/term.el5
5 files changed, 19 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f3c94c1818d..04cb6e73e1c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,14 @@
12014-04-23 Stefan Monnier <monnier@iro.umontreal.ca> 12014-04-23 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * simple.el (completion-list-mode-map): Use choose-completion for the
4 mouse binding as well (bug#17302).
5 (completion-list-mode, completion-setup-function): Adjust docstring and
6 echo area message accordingly.
7 * progmodes/idlwave.el (idlwave-choose-completion): Adjust to new
8 calling convention of choose-completion.
9 * comint.el (comint-dynamic-list-completions):
10 * term.el (term-dynamic-list-completions): Accept choose-completion.
11
3 * progmodes/perl-mode.el (perl-syntax-propertize-function): Slash after 12 * progmodes/perl-mode.el (perl-syntax-propertize-function): Slash after
4 &, |, +, - and * can't be a division (bug#17317). 13 &, |, +, - and * can't be a division (bug#17317).
5 14
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."
3326 (and (consp first) (consp (event-start first)) 3326 (and (consp first) (consp (event-start first))
3327 (eq (window-buffer (posn-window (event-start first))) 3327 (eq (window-buffer (posn-window (event-start first)))
3328 (get-buffer "*Completions*")) 3328 (get-buffer "*Completions*"))
3329 (eq (key-binding key) 'mouse-choose-completion))) 3329 (memq (key-binding key)
3330 ;; If the user does mouse-choose-completion with the mouse, 3330 '(mouse-choose-completion choose-completion))))
3331 ;; If the user does choose-completion with the mouse,
3331 ;; execute the command, then delete the completion window. 3332 ;; execute the command, then delete the completion window.
3332 (progn 3333 (progn
3333 (choose-completion first) 3334 (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."
7170 7170
7171(defun idlwave-choose-completion (&rest args) 7171(defun idlwave-choose-completion (&rest args)
7172 "Choose the completion that point is in or next to." 7172 "Choose the completion that point is in or next to."
7173 (interactive) 7173 (interactive (list last-nonmenu-event))
7174 (apply 'idlwave-choose 'choose-completion args)) 7174 (apply 'idlwave-choose 'choose-completion args))
7175 7175
7176(defun idlwave-mouse-choose-completion (&rest args) 7176(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."
6870 6870
6871(defvar completion-list-mode-map 6871(defvar completion-list-mode-map
6872 (let ((map (make-sparse-keymap))) 6872 (let ((map (make-sparse-keymap)))
6873 (define-key map [mouse-2] 'mouse-choose-completion) 6873 (define-key map [mouse-2] 'choose-completion)
6874 (define-key map [follow-link] 'mouse-face) 6874 (define-key map [follow-link] 'mouse-face)
6875 (define-key map [down-mouse-2] nil) 6875 (define-key map [down-mouse-2] nil)
6876 (define-key map "\C-m" 'choose-completion) 6876 (define-key map "\C-m" 'choose-completion)
@@ -7119,8 +7119,7 @@ back on `completion-list-insert-choice-function' when nil."
7119 "Major mode for buffers showing lists of possible completions. 7119 "Major mode for buffers showing lists of possible completions.
7120Type \\<completion-list-mode-map>\\[choose-completion] in the completion list\ 7120Type \\<completion-list-mode-map>\\[choose-completion] in the completion list\
7121 to select the completion near point. 7121 to select the completion near point.
7122Use \\<completion-list-mode-map>\\[mouse-choose-completion] to select one\ 7122Or click to select one with the mouse.
7123 with the mouse.
7124 7123
7125\\{completion-list-mode-map}" 7124\\{completion-list-mode-map}"
7126 (set (make-local-variable 'completion-base-size) nil)) 7125 (set (make-local-variable 'completion-base-size) nil))
@@ -7178,7 +7177,7 @@ Called from `temp-buffer-show-hook'."
7178 (goto-char (point-min)) 7177 (goto-char (point-min))
7179 (if (display-mouse-p) 7178 (if (display-mouse-p)
7180 (insert (substitute-command-keys 7179 (insert (substitute-command-keys
7181 "Click \\[mouse-choose-completion] on a completion to select it.\n"))) 7180 "Click on a completion to select it.\n")))
7182 (insert (substitute-command-keys 7181 (insert (substitute-command-keys
7183 "In this buffer, type \\[choose-completion] to \ 7182 "In this buffer, type \\[choose-completion] to \
7184select the completion near point.\n\n")))))) 7183select 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."
4137 (and (consp first) 4137 (and (consp first)
4138 (eq (window-buffer (posn-window (event-start first))) 4138 (eq (window-buffer (posn-window (event-start first)))
4139 (get-buffer "*Completions*")) 4139 (get-buffer "*Completions*"))
4140 (eq (key-binding key) 'mouse-choose-completion))) 4140 (memq (key-binding key)
4141 ;; If the user does mouse-choose-completion with the mouse, 4141 '(mouse-choose-completion choose-completion))))
4142 ;; If the user does choose-completion with the mouse,
4142 ;; execute the command, then delete the completion window. 4143 ;; execute the command, then delete the completion window.
4143 (progn 4144 (progn
4144 (choose-completion first) 4145 (choose-completion first)