aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2014-05-05 19:54:06 -0400
committerStefan Monnier2014-05-05 19:54:06 -0400
commitbf67c3f7ef0260eaf31ec301f8ba3c87809bd076 (patch)
tree52161bf8ace7adbd2f12bc1bba22bb0cd049a48d
parentc22f24f6ef76b6bc62bbaafb0b1423bff3d867d4 (diff)
downloademacs-bf67c3f7ef0260eaf31ec301f8ba3c87809bd076.tar.gz
emacs-bf67c3f7ef0260eaf31ec301f8ba3c87809bd076.zip
* lisp/minibuffer.el (completion--try-word-completion): Revert fix for
Bug#15980. Fixes: debbugs:17375
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/minibuffer.el25
2 files changed, 15 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 043a0c240b1..6aabf022b7b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12014-05-05 Stefan Monnier <monnier@iro.umontreal.ca> 12014-05-05 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * minibuffer.el (completion--try-word-completion): Revert fix for
4 Bug#15980 (bug#17375).
5
3 * xt-mouse.el (xterm-mouse--read-event-sequence-1000): (bug#17378) 6 * xt-mouse.el (xterm-mouse--read-event-sequence-1000): (bug#17378)
4 Always store button numbers in the same way in xterm-mouse-last; 7 Always store button numbers in the same way in xterm-mouse-last;
5 Don't burp is xterm-mouse-last is not set as expected. 8 Don't burp is xterm-mouse-last is not set as expected.
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 87ba8a22e64..929ab3dc325 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1389,19 +1389,18 @@ appear to be a match."
1389 ;; instead, but it was too blunt, leading to situations where SPC 1389 ;; instead, but it was too blunt, leading to situations where SPC
1390 ;; was the only insertable char at point but minibuffer-complete-word 1390 ;; was the only insertable char at point but minibuffer-complete-word
1391 ;; refused inserting it. 1391 ;; refused inserting it.
1392 (let* ((exts (mapcar (lambda (str) (propertize str 'completion-try-word t)) 1392 (let ((exts (mapcar (lambda (str) (propertize str 'completion-try-word t))
1393 '(" " "-"))) 1393 '(" " "-")))
1394 (before (substring string 0 point)) 1394 (before (substring string 0 point))
1395 (after (substring string point)) 1395 (after (substring string point))
1396 (comps 1396 tem)
1397 (delete nil 1397 ;; If both " " and "-" lead to completions, prefer " " so SPC behaves
1398 (mapcar (lambda (ext) 1398 ;; a bit more like a self-inserting key (bug#17375).
1399 (completion-try-completion 1399 (while (and exts (not (consp tem)))
1400 (concat before ext after) 1400 (setq tem (completion-try-completion
1401 table predicate (1+ point) md)) 1401 (concat before (pop exts) after)
1402 exts)))) 1402 table predicate (1+ point) md)))
1403 (when (and (null (cdr comps)) (consp (car comps))) 1403 (if (consp tem) (setq comp tem))))
1404 (setq comp (car comps)))))
1405 1404
1406 ;; Completing a single word is actually more difficult than completing 1405 ;; Completing a single word is actually more difficult than completing
1407 ;; as much as possible, because we first have to find the "current 1406 ;; as much as possible, because we first have to find the "current