aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEyal Lotem2013-06-12 00:18:49 -0700
committerGlenn Morris2013-06-12 00:18:49 -0700
commit834b5ded7ab25adf61300161e57b6e11091db221 (patch)
treee73bff9840f25d7bf1599f3b70e2525006d83606
parentcbb3eb522d6f32ff1130cb3dfb6db4a831a05a9a (diff)
downloademacs-834b5ded7ab25adf61300161e57b6e11091db221.tar.gz
emacs-834b5ded7ab25adf61300161e57b6e11091db221.zip
Respect ido-ignore-item-p in ido-wide-find-dirs-or-files (tiny change)
* lisp/ido.el (ido-delete-ignored-files): New function, split from ido-make-file-list-1. (ido-wide-find-dirs-or-files): Maybe ignore files. (ido-make-file-list-1): Use ido-delete-ignored-files. Fixes: debbugs:13003
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/ido.el34
2 files changed, 27 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 50eb27472d5..a1a080ee9f7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12013-06-12 Eyal Lotem <eyal.lotem@gmail.com> (tiny change)
2
3 * ido.el (ido-delete-ignored-files): New function,
4 split from ido-make-file-list-1.
5 (ido-wide-find-dirs-or-files): Maybe ignore files. (Bug#13003)
6 (ido-make-file-list-1): Use ido-delete-ignored-files.
7
12013-06-12 Leo Liu <sdl.web@gmail.com> 82013-06-12 Leo Liu <sdl.web@gmail.com>
2 9
3 * progmodes/octave.el (inferior-octave-startup) 10 * progmodes/octave.el (inferior-octave-startup)
diff --git a/lisp/ido.el b/lisp/ido.el
index 8087124765c..1b7d4e78cb7 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -3273,17 +3273,25 @@ for first matching file."
3273 cur nil))) 3273 cur nil)))
3274 res)) 3274 res))
3275 3275
3276(require 'cl-lib)
3277
3278(defun ido-delete-ignored-files (files)
3279 (cl-delete-if
3280 (lambda (name) (ido-ignore-item-p name ido-ignore-files t))
3281 files))
3282
3276(defun ido-wide-find-dirs-or-files (dir file &optional prefix finddir) 3283(defun ido-wide-find-dirs-or-files (dir file &optional prefix finddir)
3277 ;; As ido-run-find-command, but returns a list of cons pairs ("file" . "dir") 3284 ;; As ido-run-find-command, but returns a list of cons pairs ("file" . "dir")
3278 (let ((filenames 3285 (let ((filenames
3279 (split-string 3286 (ido-delete-ignored-files
3280 (shell-command-to-string 3287 (split-string
3281 (concat "find " 3288 (shell-command-to-string
3282 (shell-quote-argument dir) 3289 (concat "find "
3283 " -name " 3290 (shell-quote-argument dir)
3284 (shell-quote-argument 3291 " -name "
3285 (concat (if prefix "" "*") file "*")) 3292 (shell-quote-argument
3286 " -type " (if finddir "d" "f") " -print")))) 3293 (concat (if prefix "" "*") file "*"))
3294 " -type " (if finddir "d" "f") " -print")))))
3287 filename d f 3295 filename d f
3288 res) 3296 res)
3289 (while filenames 3297 (while filenames
@@ -3578,12 +3586,10 @@ This is to make them appear as if they were \"virtual buffers\"."
3578 ;; If MERGED is non-nil, each file is cons'ed with DIR 3586 ;; If MERGED is non-nil, each file is cons'ed with DIR
3579 (and (or (ido-is-tramp-root dir) (ido-is-unc-root dir) 3587 (and (or (ido-is-tramp-root dir) (ido-is-unc-root dir)
3580 (file-directory-p dir)) 3588 (file-directory-p dir))
3581 (delq nil 3589 (mapcar
3582 (mapcar 3590 (lambda (name) (if merged (cons name dir) name))
3583 (lambda (name) 3591 (ido-delete-ignored-files
3584 (if (not (ido-ignore-item-p name ido-ignore-files t)) 3592 (ido-file-name-all-completions dir)))))
3585 (if merged (cons name dir) name)))
3586 (ido-file-name-all-completions dir)))))
3587 3593
3588(defun ido-make-file-list (default) 3594(defun ido-make-file-list (default)
3589 ;; Return the current list of files. 3595 ;; Return the current list of files.