# HG changeset patch # User Richard M. Stallman # Date 1017413047 0 # Node ID 1541aec5edea0944b16e96e603975b5fd6fe68ba # Parent acb1f97fda8f35073b6ddf83fdbb680c6042a68e (dired-do-query-replace-regexp, dired-do-search): Use FILTER arg in dired-get-marked-files to exclude directories. (dired-nondirectory-p): New function. diff -r acb1f97fda8f -r 1541aec5edea lisp/dired-aux.el --- 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)