aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-06-08 22:54:46 +0000
committerRichard M. Stallman1993-06-08 22:54:46 +0000
commit536ae2dded7a9748e77a5e3a0c64d4ed710cdd9e (patch)
treee7af85b6566dde3b0e0b829b8cdfc8aa30920f72
parent5f8a398a50ad9460557543a2797b24efbbe62203 (diff)
downloademacs-536ae2dded7a9748e77a5e3a0c64d4ed710cdd9e.tar.gz
emacs-536ae2dded7a9748e77a5e3a0c64d4ed710cdd9e.zip
(dired-flag-auto-save-files): Ignore `*' added by ls -F.
-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."
1719 ;; It is less than general to check for ~ here, 1719 ;; It is less than general to check for ~ here,
1720 ;; but it's the only way this runs fast enough. 1720 ;; but it's the only way this runs fast enough.
1721 (and (save-excursion (end-of-line) 1721 (and (save-excursion (end-of-line)
1722 (eq (preceding-char) ?#)) 1722 (or
1723 (eq (preceding-char) ?#)
1724 ;; Handle executables in case of -F option.
1725 ;; We need not worry about the other kinds
1726 ;; of markings that -F makes, since they won't
1727 ;; appear on real auto-save files.
1728 (if (eq (preceding-char) ?*)
1729 (progn
1730 (forward-char -1)
1731 (eq (preceding-char) ?#)))))
1723 (not (looking-at dired-re-dir)) 1732 (not (looking-at dired-re-dir))
1724 (let ((fn (dired-get-filename t t))) 1733 (let ((fn (dired-get-filename t t)))
1725 (if fn (auto-save-file-name-p 1734 (if fn (auto-save-file-name-p
@@ -1735,16 +1744,16 @@ With prefix argument, unflag these files."
1735 ;; It is less than general to check for ~ here, 1744 ;; It is less than general to check for ~ here,
1736 ;; but it's the only way this runs fast enough. 1745 ;; but it's the only way this runs fast enough.
1737 (and (save-excursion (end-of-line) 1746 (and (save-excursion (end-of-line)
1738 (or 1747 (or
1739 (eq (preceding-char) ?~) 1748 (eq (preceding-char) ?~)
1740 ;; Handle executables in case of -F option. 1749 ;; Handle executables in case of -F option.
1741 ;; We need not worry about the other kinds 1750 ;; We need not worry about the other kinds
1742 ;; of markings that -F makes, since they won't 1751 ;; of markings that -F makes, since they won't
1743 ;; appear on real backup files. 1752 ;; appear on real backup files.
1744 (if (eq (preceding-char) ?*) 1753 (if (eq (preceding-char) ?*)
1745 (progn 1754 (progn
1746 (forward-char -1) 1755 (forward-char -1)
1747 (eq (preceding-char) ?~))))) 1756 (eq (preceding-char) ?~)))))
1748 (not (looking-at dired-re-dir)) 1757 (not (looking-at dired-re-dir))
1749 (let ((fn (dired-get-filename t t))) 1758 (let ((fn (dired-get-filename t t)))
1750 (if fn (backup-file-name-p fn)))) 1759 (if fn (backup-file-name-p fn))))