Explorar el Código

Enable limited flex-matching for dynamic collections

Previously, for dynamic collections, ido-cr+ was limited to prefix
matching. Now all the initially availble completion candidates are
retained, and only dynamically-added candidates are limited to prefix
matching.

This isn't going to be sufficient for functions that implementn
fancier completion behaviors. The solution for those is still
blacklisting.
Ryan C. Thompson hace 8 años
padre
commit
9f44c78667
Se han modificado 1 ficheros con 10 adiciones y 3 borrados
  1. 10 3
      ido-completing-read+.el

+ 10 - 3
ido-completing-read+.el

@@ -501,9 +501,16 @@ sets up C-j to be equivalent to TAB in the same situation."
               (def (nth 6 ido-cr+-orig-completing-read-args))
               (predicate (nth 2 ido-cr+-orig-completing-read-args)))
           (setq ido-cur-list
-                (all-completions current-ido-text
-                                 ido-cr+-dynamic-collection
-                                 predicate))
+                (delete-dups
+                 (append
+                  (all-completions
+                   current-ido-text
+                   ido-cr+-dynamic-collection
+                   predicate)
+                  (all-completions
+                   ""
+                   ido-cr+-dynamic-collection
+                   predicate))))
           (unless (listp def)
             (setq def (list def)))
           (when def