changeset 44235:1541aec5edea

(dired-do-query-replace-regexp, dired-do-search): Use FILTER arg in dired-get-marked-files to exclude directories. (dired-nondirectory-p): New function.
author Richard M. Stallman <rms@gnu.org>
date Fri, 29 Mar 2002 14:44:07 +0000
parents acb1f97fda8f
children ad1e190a9fbc
files lisp/dired-aux.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/dired-aux.el	Fri Mar 29 14:43:14 2002 +0000
+++ b/lisp/dired-aux.el	Fri Mar 29 14:44:07 2002 +0000
@@ -1993,7 +1993,7 @@
 Stops when a match is found.
 To continue searching for next match, use command \\[tags-loop-continue]."
   (interactive "sSearch marked files (regexp): ")
-  (tags-search regexp '(dired-get-marked-files)))
+  (tags-search regexp '(dired-get-marked-files nil nil 'dired-nondirectory-p)))
 
 ;;;###autoload
 (defun dired-do-query-replace-regexp (from to &optional delimited)
@@ -2003,7 +2003,11 @@
 with the command \\[tags-loop-continue]."
   (interactive
    "sQuery replace in marked files (regexp): \nsQuery replace %s by: \nP")
-  (tags-query-replace from to delimited '(dired-get-marked-files)))
+  (tags-query-replace from to delimited
+		      '(dired-get-marked-files nil nil 'dired-nondirectory-p)))
+
+(defun dired-nondirectory-p (file)
+  (not (file-directory-p file)))
 
 ;;;###autoload
 (defun dired-show-file-type (file &optional deref-symlinks)