[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117065: * lisp/minibuffer.el (completion--try-wo
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs-24 r117065: * lisp/minibuffer.el (completion--try-word-completion): Revert fix for |
Date: |
Mon, 05 May 2014 23:54:11 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117065
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17375
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Mon 2014-05-05 19:54:06 -0400
message:
* lisp/minibuffer.el (completion--try-word-completion): Revert fix for
Bug#15980.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/minibuffer.el
minibuffer.el-20091113204419-o5vbwnq5f7feedwu-8622
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-05-05 23:50:20 +0000
+++ b/lisp/ChangeLog 2014-05-05 23:54:06 +0000
@@ -1,5 +1,8 @@
2014-05-05 Stefan Monnier <address@hidden>
+ * minibuffer.el (completion--try-word-completion): Revert fix for
+ Bug#15980 (bug#17375).
+
* xt-mouse.el (xterm-mouse--read-event-sequence-1000): (bug#17378)
Always store button numbers in the same way in xterm-mouse-last;
Don't burp is xterm-mouse-last is not set as expected.
=== modified file 'lisp/minibuffer.el'
--- a/lisp/minibuffer.el 2014-05-05 01:46:47 +0000
+++ b/lisp/minibuffer.el 2014-05-05 23:54:06 +0000
@@ -1389,19 +1389,18 @@
;; instead, but it was too blunt, leading to situations where SPC
;; was the only insertable char at point but minibuffer-complete-word
;; refused inserting it.
- (let* ((exts (mapcar (lambda (str) (propertize str
'completion-try-word t))
- '(" " "-")))
- (before (substring string 0 point))
- (after (substring string point))
- (comps
- (delete nil
- (mapcar (lambda (ext)
- (completion-try-completion
- (concat before ext after)
- table predicate (1+ point) md))
- exts))))
- (when (and (null (cdr comps)) (consp (car comps)))
- (setq comp (car comps)))))
+ (let ((exts (mapcar (lambda (str) (propertize str 'completion-try-word
t))
+ '(" " "-")))
+ (before (substring string 0 point))
+ (after (substring string point))
+ tem)
+ ;; If both " " and "-" lead to completions, prefer " " so SPC behaves
+ ;; a bit more like a self-inserting key (bug#17375).
+ (while (and exts (not (consp tem)))
+ (setq tem (completion-try-completion
+ (concat before (pop exts) after)
+ table predicate (1+ point) md)))
+ (if (consp tem) (setq comp tem))))
;; Completing a single word is actually more difficult than completing
;; as much as possible, because we first have to find the "current
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117065: * lisp/minibuffer.el (completion--try-word-completion): Revert fix for,
Stefan Monnier <=