[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108066: * lisp/minibuffer.el (comple
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108066: * lisp/minibuffer.el (completion-table-with-quoting): Fix compatibility |
Date: |
Mon, 30 Apr 2012 20:21:23 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 108066
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2012-04-30 20:21:23 -0400
message:
* lisp/minibuffer.el (completion-table-with-quoting): Fix compatibility
all-completions code to not return a number in the last cdr.
modified:
lisp/ChangeLog
lisp/minibuffer.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2012-04-30 11:57:47 +0000
+++ b/lisp/ChangeLog 2012-05-01 00:21:23 +0000
@@ -1,3 +1,8 @@
+2012-05-01 Stefan Monnier <address@hidden>
+
+ * minibuffer.el (completion-table-with-quoting): Fix compatibility
+ all-completions code to not return a number in the last cdr.
+
2012-04-30 Leo Liu <address@hidden>
* ibuf-ext.el (ibuffer-diff-buffer-with-file-1): Avoid buffer
=== modified file 'lisp/minibuffer.el'
--- a/lisp/minibuffer.el 2012-04-26 03:18:47 +0000
+++ b/lisp/minibuffer.el 2012-05-01 00:21:23 +0000
@@ -420,6 +420,13 @@
(length string))))))
(list* 'boundaries qlboundary qrboundary)))
+ ;; In "normal" use a c-t-with-quoting completion table should never be
+ ;; called with action in (t nil) because `completion--unquote' should have
+ ;; been called before and would have returned a different completion table
+ ;; to apply to the unquoted text. But there's still a lot of code around
+ ;; that likes to use all/try-completions directly, so we do our best to
+ ;; handle those calls as well as we can.
+
((eq action nil) ;;try-completion
(let* ((ustring (funcall unquote string))
(completion (try-completion ustring table pred)))
@@ -447,10 +454,14 @@
(pcase-let*
((ustring (funcall unquote string))
(completions (all-completions ustring table pred))
- (boundary (car (completion-boundaries ustring table pred ""))))
- (completion--twq-all
- string ustring completions boundary unquote requote)))
-
+ (boundary (car (completion-boundaries ustring table pred "")))
+ (completions
+ (completion--twq-all
+ string ustring completions boundary unquote requote))
+ (last (last completions)))
+ (when (consp last) (setcdr last nil))
+ completions))
+
((eq action 'completion--unquote)
(let ((ustring (funcall unquote string))
(uprefix (funcall unquote (substring string 0 pred))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108066: * lisp/minibuffer.el (completion-table-with-quoting): Fix compatibility,
Stefan Monnier <=