]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/minibuffer.el (completion--twq-all): Disable too-strict assertions.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 28 Oct 2012 19:07:52 +0000 (15:07 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 28 Oct 2012 19:07:52 +0000 (15:07 -0400)
Fixes: debbugs:11714
lisp/ChangeLog
lisp/minibuffer.el

index 74e63b140c4b529b9303908debc6d269d478587b..2bdf074b9d5d58a565de97dbaf3a26b8741f12e2 100644 (file)
@@ -2,6 +2,7 @@
 
        * minibuffer.el (completion--sifn-requote): Rewrite to handle things
        like Tramp's "/foo:~bar//baz" -> "/scpc:foo:/baz" mapping (bug#11714).
+       (completion--twq-all): Disable too-strict assertions.
 
        * tmm.el (tmm-prompt): Use map-keymap (bug#12744).
 
index 420d8f9d0fddd589dfc3bef269e022c287313295..38347f23f7ddb941a818e2d48239b52c69b7a94c 100644 (file)
@@ -529,10 +529,12 @@ for use at QPOS."
          (`(,qfullpos . ,qfun)
           (funcall requote (+ boundary (length prefix)) string))
          (qfullprefix (substring string 0 qfullpos))
-         (_ (cl-assert (completion--string-equal-p
-                        (funcall unquote qfullprefix)
-                        (concat (substring ustring 0 boundary) prefix))
-                       t))
+        ;; FIXME: This assertion can be wrong, e.g. in Cygwin, where
+        ;; (unquote "c:\bin") => "/usr/bin" but (unquote "c:\") => "/".
+         ;;(cl-assert (completion--string-equal-p
+         ;;            (funcall unquote qfullprefix)
+         ;;            (concat (substring ustring 0 boundary) prefix))
+         ;;           t))
          (qboundary (car (funcall requote boundary string)))
          (_ (cl-assert (<= qboundary qfullpos)))
          ;; FIXME: this split/quote/concat business messes up the carefully
@@ -561,14 +563,16 @@ for use at QPOS."
                  (let* ((new (substring completion (length prefix)))
                         (qnew (funcall qfun new))
                         (qcompletion (concat qprefix qnew)))
-                   (cl-assert
-                    (completion--string-equal-p
-                    (funcall unquote
-                             (concat (substring string 0 qboundary)
-                                     qcompletion))
-                    (concat (substring ustring 0 boundary)
-                            completion))
-                   t)
+                  ;; FIXME: Similarly here, Cygwin's mapping trips this
+                  ;; assertion.
+                   ;;(cl-assert
+                   ;; (completion--string-equal-p
+                  ;;  (funcall unquote
+                  ;;           (concat (substring string 0 qboundary)
+                  ;;                   qcompletion))
+                  ;;  (concat (substring ustring 0 boundary)
+                  ;;          completion))
+                  ;; t)
                    qcompletion))
                completions)
        qboundary))))