[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r112940: Respect ido-ignore-item-p in ido-wide-find-
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r112940: Respect ido-ignore-item-p in ido-wide-find-dirs-or-files (tiny change) |
Date: |
Wed, 12 Jun 2013 07:19:01 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 112940
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/13003
author: Eyal Lotem <address@hidden>
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-06-12 00:18:49 -0700
message:
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.
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 02:37:38 +0000
+++ b/lisp/ChangeLog 2013-06-12 07:18:49 +0000
@@ -1,3 +1,10 @@
+2013-06-12 Eyal Lotem <address@hidden> (tiny change)
+
+ * ido.el (ido-delete-ignored-files): New function,
+ split from ido-make-file-list-1.
+ (ido-wide-find-dirs-or-files): Maybe ignore files. (Bug#13003)
+ (ido-make-file-list-1): Use ido-delete-ignored-files.
+
2013-06-12 Leo Liu <address@hidden>
* progmodes/octave.el (inferior-octave-startup)
=== modified file 'lisp/ido.el'
--- a/lisp/ido.el 2013-05-17 02:43:41 +0000
+++ b/lisp/ido.el 2013-06-12 07:18:49 +0000
@@ -3273,17 +3273,25 @@
cur nil)))
res))
+(require 'cl-lib)
+
+(defun ido-delete-ignored-files (files)
+ (cl-delete-if
+ (lambda (name) (ido-ignore-item-p name ido-ignore-files t))
+ 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
- (split-string
- (shell-command-to-string
- (concat "find "
- (shell-quote-argument dir)
- " -name "
- (shell-quote-argument
- (concat (if prefix "" "*") file "*"))
- " -type " (if finddir "d" "f") " -print"))))
+ (ido-delete-ignored-files
+ (split-string
+ (shell-command-to-string
+ (concat "find "
+ (shell-quote-argument dir)
+ " -name "
+ (shell-quote-argument
+ (concat (if prefix "" "*") file "*"))
+ " -type " (if finddir "d" "f") " -print")))))
filename d f
res)
(while filenames
@@ -3578,12 +3586,10 @@
;; 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))
- (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)))))
+ (mapcar
+ (lambda (name) (if merged (cons name dir) name))
+ (ido-delete-ignored-files
+ (ido-file-name-all-completions dir)))))
(defun ido-make-file-list (default)
;; Return the current list of files.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r112940: Respect ido-ignore-item-p in ido-wide-find-dirs-or-files (tiny change),
Glenn Morris <=