emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r112943: * lisp/ido.el (ido-delete-ignored-files): R


From: Glenn Morris
Subject: [Emacs-diffs] trunk r112943: * lisp/ido.el (ido-delete-ignored-files): Remove.
Date: Wed, 12 Jun 2013 07:46:51 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112943
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-06-12 00:46:01 -0700
message:
  * lisp/ido.el (ido-delete-ignored-files): Remove.
  (ido-wide-find-dirs-or-files, ido-make-file-list-1):
  Go back to calling ido-ignore-item-p directly.
  
  Doesn't seem worth looping over files twice in ido-make-file-list-1.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/ido.el                    ido.el-20091113204419-o5vbwnq5f7feedwu-2430
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-06-12 07:25:05 +0000
+++ b/lisp/ChangeLog    2013-06-12 07:46:01 +0000
@@ -1,6 +1,8 @@
 2013-06-12  Glenn Morris  <address@hidden>
 
-       * ido.el (ido-delete-ignored-files): Rewrite to avoid cl-lib.
+       * ido.el (ido-delete-ignored-files): Remove.
+       (ido-wide-find-dirs-or-files, ido-make-file-list-1):
+       Go back to calling ido-ignore-item-p directly.
 
 2013-06-12  Eyal Lotem  <address@hidden>  (tiny change)
 

=== modified file 'lisp/ido.el'
--- a/lisp/ido.el       2013-06-12 07:25:05 +0000
+++ b/lisp/ido.el       2013-06-12 07:46:01 +0000
@@ -3273,25 +3273,21 @@
              cur nil)))
     res))
 
-(defun ido-delete-ignored-files (files)
-  "Delete elements from list FILES that match `ido-ignore-item-p'."
-  (delq nil
-        (mapcar (lambda (name)
-                  (unless (ido-ignore-item-p name ido-ignore-files t) name))
-                files)))
-
 (defun ido-wide-find-dirs-or-files (dir file &optional prefix finddir)
   ;; As ido-run-find-command, but returns a list of cons pairs ("file" . "dir")
   (let ((filenames
-         (ido-delete-ignored-files
-          (split-string
-           (shell-command-to-string
-            (concat "find "
-                    (shell-quote-argument dir)
-                    (if ido-case-fold " -iname " " -name ")
-                    (shell-quote-argument
-                     (concat (if prefix "" "*") file "*"))
-                    " -type " (if finddir "d" "f") " -print")))))
+         (delq nil
+               (mapcar (lambda (name)
+                         (unless (ido-ignore-item-p name ido-ignore-files t)
+                           name))
+                       (split-string
+                        (shell-command-to-string
+                         (concat "find "
+                                 (shell-quote-argument dir)
+                                 (if ido-case-fold " -iname " " -name ")
+                                 (shell-quote-argument
+                                  (concat (if prefix "" "*") file "*"))
+                                 " -type " (if finddir "d" "f") " -print"))))))
        filename d f
        res)
     (while filenames
@@ -3586,10 +3582,12 @@
   ;; If MERGED is non-nil, each file is cons'ed with DIR
   (and (or (ido-is-tramp-root dir) (ido-is-unc-root dir)
           (file-directory-p dir))
-       (mapcar
-       (lambda (name) (if merged (cons name dir) name))
-       (ido-delete-ignored-files
-        (ido-file-name-all-completions dir)))))
+       (delq nil
+            (mapcar
+             (lambda (name)
+               (if (not (ido-ignore-item-p name ido-ignore-files t))
+                   (if merged (cons name dir) name)))
+             (ido-file-name-all-completions dir)))))
 
 (defun ido-make-file-list (default)
   ;; Return the current list of files.


reply via email to

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