Commit bf67c3f7 authored by Stefan Monnier's avatar Stefan Monnier

* lisp/minibuffer.el (completion--try-word-completion): Revert fix for

Bug#15980.

Fixes: debbugs:17375
parent c22f24f6
2014-05-05 Stefan Monnier <monnier@iro.umontreal.ca> 2014-05-05 Stefan Monnier <monnier@iro.umontreal.ca>
* minibuffer.el (completion--try-word-completion): Revert fix for
Bug#15980 (bug#17375).
* xt-mouse.el (xterm-mouse--read-event-sequence-1000): (bug#17378) * xt-mouse.el (xterm-mouse--read-event-sequence-1000): (bug#17378)
Always store button numbers in the same way in xterm-mouse-last; Always store button numbers in the same way in xterm-mouse-last;
Don't burp is xterm-mouse-last is not set as expected. Don't burp is xterm-mouse-last is not set as expected.
......
...@@ -1389,19 +1389,18 @@ appear to be a match." ...@@ -1389,19 +1389,18 @@ appear to be a match."
;; instead, but it was too blunt, leading to situations where SPC ;; instead, but it was too blunt, leading to situations where SPC
;; was the only insertable char at point but minibuffer-complete-word ;; was the only insertable char at point but minibuffer-complete-word
;; refused inserting it. ;; refused inserting it.
(let* ((exts (mapcar (lambda (str) (propertize str 'completion-try-word t)) (let ((exts (mapcar (lambda (str) (propertize str 'completion-try-word t))
'(" " "-"))) '(" " "-")))
(before (substring string 0 point)) (before (substring string 0 point))
(after (substring string point)) (after (substring string point))
(comps tem)
(delete nil ;; If both " " and "-" lead to completions, prefer " " so SPC behaves
(mapcar (lambda (ext) ;; a bit more like a self-inserting key (bug#17375).
(completion-try-completion (while (and exts (not (consp tem)))
(concat before ext after) (setq tem (completion-try-completion
table predicate (1+ point) md)) (concat before (pop exts) after)
exts)))) table predicate (1+ point) md)))
(when (and (null (cdr comps)) (consp (car comps))) (if (consp tem) (setq comp tem))))
(setq comp (car comps)))))
;; Completing a single word is actually more difficult than completing ;; Completing a single word is actually more difficult than completing
;; as much as possible, because we first have to find the "current ;; as much as possible, because we first have to find the "current
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment