[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog minibuffer.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog minibuffer.el |
Date: |
Tue, 14 Apr 2009 02:02:34 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 09/04/14 02:02:33
Modified files:
lisp : ChangeLog minibuffer.el
Log message:
(completion--try-word-completion): Don't disable
`partial-completion' any more. Mark the added char instead.
(completion-pcm--string->pattern): Notice chars added by
completion--try-word-completion and treat them specially.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15584&r2=1.15585
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/minibuffer.el?cvsroot=emacs&r1=1.75&r2=1.76
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15584
retrieving revision 1.15585
diff -u -b -r1.15584 -r1.15585
--- ChangeLog 13 Apr 2009 14:06:48 -0000 1.15584
+++ ChangeLog 14 Apr 2009 02:02:30 -0000 1.15585
@@ -1,3 +1,10 @@
+2009-04-14 Stefan Monnier <address@hidden>
+
+ * minibuffer.el (completion--try-word-completion): Don't disable
+ `partial-completion' any more. Mark the added char instead.
+ (completion-pcm--string->pattern): Notice chars added by
+ completion--try-word-completion and treat them specially.
+
2009-04-13 Jason Rumney <address@hidden>
* faces.el (frame-set-background-mode): Window system frames
@@ -6,13 +13,12 @@
2009-04-13 Kenichi Handa <address@hidden>
- * language/japanese.el (cp932): Delete alias for
- japanese-shift-jis.
+ * language/japanese.el (cp932): Delete alias for japanese-shift-jis.
2009-04-12 Michael Albinus <address@hidden>
- * net/tramp.el (tramp-do-copy-or-rename-file-directly): Overwrite
- always the tmpfile. (Bug#2962).
+ * net/tramp.el (tramp-do-copy-or-rename-file-directly):
+ Overwrite always the tmpfile. (Bug#2962).
2009-04-11 Chong Yidong <address@hidden>
@@ -25,8 +31,8 @@
(hack-dir-local-variables): Adapt to new
dir-locals-directory-cache entry format.
- * international/mule-diag.el (describe-font-internal): Change
- ignored argument to IGNORED.
+ * international/mule-diag.el (describe-font-internal):
+ Rename ignored argument to IGNORED.
(describe-font): Elide unnecessary argument to
describe-font-internal (Bug#2945).
@@ -85,8 +91,7 @@
2009-04-09 Michael Albinus <address@hidden>
- * net/tramp.el (tramp-file-name-handler-alist): Add
- `vc-registered'.
+ * net/tramp.el (tramp-file-name-handler-alist): Add `vc-registered'.
(tramp-handle-vc-registered ): New defun. (Bug#1741).
* net/tramp-cache.el (tramp-flush-directory-property): Use the
Index: minibuffer.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/minibuffer.el,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -b -r1.75 -r1.76
--- minibuffer.el 17 Mar 2009 04:39:09 -0000 1.75
+++ minibuffer.el 14 Apr 2009 02:02:33 -0000 1.76
@@ -607,13 +607,17 @@
;; If completion finds next char not unique,
;; consider adding a space or a hyphen.
(when (= (length string) (length (car comp)))
- (let ((exts '(" " "-"))
+ ;; Mark the added char with the `completion-word' property, so it
+ ;; can be handled specially by completion styles such as
+ ;; partial-completion.
+ ;; We used to remove `partial-completion' from completion-styles
+ ;; 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))
- ;; Disable partial-completion for this.
- (completion-styles
- (or (remove 'partial-completion completion-styles)
- completion-styles))
tem)
(while (and exts (not (consp tem)))
(setq tem (completion-try-completion
@@ -1381,7 +1385,13 @@
(p 0)
(p0 0))
- (while (setq p (string-match-p completion-pcm--delim-wild-regex string
p))
+ (while (and (setq p (string-match-p completion-pcm--delim-wild-regex
+ string p))
+ ;; If the char was added by minibuffer-complete-word, then
+ ;; don't treat it as a delimiter, otherwise "M-x SPC"
+ ;; ends up inserting a "-" rather than listing
+ ;; all completions.
+ (not (get-text-property p 'completion-try-word string)))
(push (substring string p0 p) pattern)
(if (eq (aref string p) ?*)
(progn
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp ChangeLog minibuffer.el,
Stefan Monnier <=