emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/ido.el,v


From: Kim F. Storm
Subject: [Emacs-diffs] Changes to emacs/lisp/ido.el,v
Date: Tue, 22 Aug 2006 09:45:14 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Kim F. Storm <kfstorm>  06/08/22 09:45:13

Index: ido.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ido.el,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -b -r1.101 -r1.102
--- ido.el      11 Jul 2006 20:13:59 -0000      1.101
+++ ido.el      22 Aug 2006 09:45:13 -0000      1.102
@@ -1840,6 +1840,7 @@
                       (and d (cdr d)))))))
        (if (member ido-default-item ido-ignore-item-temp-list)
            (setq ido-default-item nil))
+       (ido-trace "new default" ido-default-item)
        (setq ido-set-default-item nil))
 
       (if ido-process-ignore-lists-inhibit
@@ -3528,20 +3529,21 @@
   (let* ((case-fold-search  ido-case-fold)
         (slash (and (not ido-enable-prefix) (ido-final-slash ido-text)))
         (text (if slash (substring ido-text 0 -1) ido-text))
-        (rexq (concat (if ido-enable-regexp text (regexp-quote text)) (if 
slash ".*/" "")))
+        (rex0 (if ido-enable-regexp text (regexp-quote text)))
+        (rexq (concat rex0 (if slash ".*/" "")))
         (re (if ido-enable-prefix (concat "\\`" rexq) rexq))
-        (full-re (and do-full (not ido-enable-regexp) (not (string-match 
"\$\\'" re))
-                      (concat "\\`" re "\\'")))
+        (full-re (and do-full (not ido-enable-regexp) (not (string-match 
"\$\\'" rex0))
+                      (concat "\\`" rex0 (if slash "/" "") "\\'")))
+        (suffix-re (and do-full slash
+                        (not ido-enable-regexp) (not (string-match "\$\\'" 
rex0))
+                        (concat rex0 "/\\'")))
         (prefix-re (and full-re (not ido-enable-prefix)
                         (concat "\\`" rexq)))
         (non-prefix-dot (or (not ido-enable-dot-prefix)
                             (not ido-process-ignore-lists)
                             ido-enable-prefix
                             (= (length ido-text) 0)))
-
-        full-matches
-        prefix-matches
-        matches)
+        full-matches suffix-matches prefix-matches matches)
     (setq ido-incomplete-regexp nil)
     (condition-case error
         (mapcar
@@ -3555,6 +3557,8 @@
                  (cond
                   ((and full-re (string-match full-re name))
                    (setq full-matches (cons item full-matches)))
+                 ((and suffix-re (string-match suffix-re name))
+                  (setq suffix-matches (cons item suffix-matches)))
                   ((and prefix-re (string-match prefix-re name))
                    (setq prefix-matches (cons item prefix-matches)))
                   (t (setq matches (cons item matches))))))
@@ -3566,9 +3570,14 @@
              ;; special-case single match, and handle appropriately
              ;; elsewhere.
              matches (cdr error))))
-    (if prefix-matches
+    (when prefix-matches
+      (ido-trace "prefix match" prefix-matches)
        (setq matches (nconc prefix-matches matches)))
-    (if full-matches
+    (when suffix-matches
+      (ido-trace "suffix match" (list text suffix-re suffix-matches))
+      (setq matches (nconc suffix-matches matches)))
+    (when full-matches
+      (ido-trace "full match" (list text full-re full-matches))
        (setq matches (nconc full-matches matches)))
     (when (and (null matches)
               ido-enable-flex-matching
@@ -4096,12 +4105,13 @@
          try-single-dir-match
          refresh)
 
+      (when ido-trace-enable
       (ido-trace "\nexhibit" this-command)
       (ido-trace "dir" ido-current-directory)
       (ido-trace "contents" contents)
       (ido-trace "list" ido-cur-list)
       (ido-trace "matches" ido-matches)
-      (ido-trace "rescan" ido-rescan)
+       (ido-trace "rescan" ido-rescan))
 
       (save-excursion
        (goto-char (point-max))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]