summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1993-06-08 22:54:46 +0000
committerRichard M. Stallman <rms@gnu.org>1993-06-08 22:54:46 +0000
commit536ae2dded7a9748e77a5e3a0c64d4ed710cdd9e (patch)
treee7af85b6566dde3b0e0b829b8cdfc8aa30920f72 /lisp
parent5f8a398a50ad9460557543a2797b24efbbe62203 (diff)
downloademacs-536ae2dded7a9748e77a5e3a0c64d4ed710cdd9e.tar.gz
(dired-flag-auto-save-files): Ignore `*' added by ls -F.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/dired.el31
1 files changed, 20 insertions, 11 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index 4cdc1dab066..680b116dd01 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1719,7 +1719,16 @@ A prefix argument says to unflag those files instead."
;; It is less than general to check for ~ here,
;; but it's the only way this runs fast enough.
(and (save-excursion (end-of-line)
- (eq (preceding-char) ?#))
+ (or
+ (eq (preceding-char) ?#)
+ ;; Handle executables in case of -F option.
+ ;; We need not worry about the other kinds
+ ;; of markings that -F makes, since they won't
+ ;; appear on real auto-save files.
+ (if (eq (preceding-char) ?*)
+ (progn
+ (forward-char -1)
+ (eq (preceding-char) ?#)))))
(not (looking-at dired-re-dir))
(let ((fn (dired-get-filename t t)))
(if fn (auto-save-file-name-p
@@ -1735,16 +1744,16 @@ With prefix argument, unflag these files."
;; It is less than general to check for ~ here,
;; but it's the only way this runs fast enough.
(and (save-excursion (end-of-line)
- (or
- (eq (preceding-char) ?~)
- ;; Handle executables in case of -F option.
- ;; We need not worry about the other kinds
- ;; of markings that -F makes, since they won't
- ;; appear on real backup files.
- (if (eq (preceding-char) ?*)
- (progn
- (forward-char -1)
- (eq (preceding-char) ?~)))))
+ (or
+ (eq (preceding-char) ?~)
+ ;; Handle executables in case of -F option.
+ ;; We need not worry about the other kinds
+ ;; of markings that -F makes, since they won't
+ ;; appear on real backup files.
+ (if (eq (preceding-char) ?*)
+ (progn
+ (forward-char -1)
+ (eq (preceding-char) ?~)))))
(not (looking-at dired-re-dir))
(let ((fn (dired-get-filename t t)))
(if fn (backup-file-name-p fn))))