summaryrefslogtreecommitdiff
path: root/lisp/dired-aux.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-03-29 14:45:05 +0000
committerRichard M. Stallman <rms@gnu.org>2002-03-29 14:45:05 +0000
commit5e514c27128adafc57921e13f529e591f606d882 (patch)
tree6e94d6112d8e4b021354419ed19f5eebd97c81fb /lisp/dired-aux.el
parent1312bfc633ffb1d9a7e2c350922e78e7c82e79ea (diff)
downloademacs-5e514c27128adafc57921e13f529e591f606d882.tar.gz
(dired-do-query-replace-regexp, dired-do-search):
Use FILTER arg in dired-get-marked-files to exclude directories. (dired-nondirectory-p): New function.
Diffstat (limited to 'lisp/dired-aux.el')
-rw-r--r--lisp/dired-aux.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 8e4a8e0ded9..855deb2702c 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1993,7 +1993,7 @@ Use \\[dired-hide-subdir] to (un)hide a particular subdirectory."
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 @@ If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
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)