summaryrefslogtreecommitdiff
path: root/lisp/dired.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-06-14 11:46:56 +0000
committerRichard M. Stallman <rms@gnu.org>1995-06-14 11:46:56 +0000
commit477569f9877bd719349ef4805f9060e8ce78ab86 (patch)
tree4270e1ac146e9a8c6ffe5eb1eba2d69db1779007 /lisp/dired.el
parent9a1314a29f9e37bdf0560e465e65f4102d0ac9e4 (diff)
downloademacs-477569f9877bd719349ef4805f9060e8ce78ab86.tar.gz
(dired-change-marks): If OLD is a space, don't act on non-file lines.
Diffstat (limited to 'lisp/dired.el')
-rw-r--r--lisp/dired.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index d049ee706d8..4afb66871cf 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2039,8 +2039,12 @@ OLD and NEW are both characters used to mark files."
(save-excursion
(goto-char (point-min))
(while (search-forward string nil t)
- (subst-char-in-region (match-beginning 0)
- (match-end 0) old new))))))
+ (if (if (= old ?\ )
+ (save-match-data
+ (dired-get-filename 'no-dir t))
+ t)
+ (subst-char-in-region (match-beginning 0)
+ (match-end 0) old new)))))))
(defun dired-unmark-all-files-no-query ()
"Remove all marks from all files in the Dired buffer."