emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp ChangeLog progmodes/grep.el


From: Sam Steingold
Subject: [Emacs-diffs] emacs/lisp ChangeLog progmodes/grep.el
Date: Wed, 08 Jul 2009 14:24:00 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Sam Steingold <sds>     09/07/08 14:24:00

Modified files:
        lisp           : ChangeLog 
        lisp/progmodes : grep.el 

Log message:
        (rgrep): Allow grep-find-ignored-directories
        to be a cons cell (test . ignored-directory) to selectively ignore
        some directories depending on the location of the search.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15792&r2=1.15793
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/progmodes/grep.el?cvsroot=emacs&r1=1.101&r2=1.102

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15792
retrieving revision 1.15793
diff -u -b -r1.15792 -r1.15793
--- ChangeLog   8 Jul 2009 12:43:42 -0000       1.15792
+++ ChangeLog   8 Jul 2009 14:23:57 -0000       1.15793
@@ -1,3 +1,9 @@
+2009-07-08  Sam Steingold  <address@hidden>
+
+       * progmodes/grep.el (rgrep): Allow grep-find-ignored-directories
+       to be a cons cell (test . ignored-directory) to selectively ignore
+       some directories depending on the location of the search.
+
 2009-07-08  Michael Albinus  <address@hidden>
 
        * net/tramp.el (tramp-set-file-uid-gid): Handle the case the

Index: progmodes/grep.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/progmodes/grep.el,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -b -r1.101 -r1.102
--- progmodes/grep.el   23 May 2009 00:11:55 -0000      1.101
+++ progmodes/grep.el   8 Jul 2009 14:24:00 -0000       1.102
@@ -194,7 +194,9 @@
 
 (defcustom grep-find-ignored-directories
   vc-directory-exclusion-list
-  "*List of names of sub-directories which `rgrep' shall not recurse into."
+  "*List of names of sub-directories which `rgrep' shall not recurse into.
+If an element is a cons cell, the car is called on the search directory
+to determine whether cdr should not be recursed into."
   :type '(repeat string)
   :group 'grep)
 
@@ -891,9 +893,16 @@
                            (concat (shell-quote-argument "(")
                                    ;; we should use shell-quote-argument here
                                    " -path "
-                                   (mapconcat #'(lambda (dir)
+                                   (mapconcat
+                                     #'(lambda (ignore)
+                                         (cond ((stringp ignore)
                                                   (shell-quote-argument
-                                                   (concat "*/" dir)))
+                                                 (concat "*/" ignore)))
+                                               ((consp ignore)
+                                                (and (funcall (car ignore) dir)
+                                                     (shell-quote-argument
+                                                      (concat "*/"
+                                                              (cdr 
ignore)))))))
                                               grep-find-ignored-directories
                                               " -o -path ")
                                    " "




reply via email to

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