Function: dired-flag-auto-save-files
dired-flag-auto-save-files is an interactive and byte-compiled
function defined in dired.el.gz.
Signature
(dired-flag-auto-save-files &optional UNFLAG-P)
Documentation
Flag for deletion files whose names suggest they are auto save files.
A prefix argument says to unmark or unflag those files instead.
If the region is active in Transient Mark mode, flag files
only in the active region if dired-mark-region is non-nil.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/dired.el.gz
;; dired-x.el has a dired-mark-sexp interactive command: mark
;; files for which PREDICATE returns non-nil.
(defun dired-flag-auto-save-files (&optional unflag-p)
"Flag for deletion files whose names suggest they are auto save files.
A prefix argument says to unmark or unflag those files instead.
If the region is active in Transient Mark mode, flag files
only in the active region if `dired-mark-region' is non-nil."
(interactive "P" dired-mode)
(let ((dired-marker-char (if unflag-p ?\s dired-del-marker)))
(dired-mark-if
;; 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 auto-save files.
(if (eq (preceding-char) ?*)
(progn
(forward-char -1)
(eq (preceding-char) ?#)))))
(not (looking-at-p dired-re-dir))
(let ((fn (dired-get-filename t t)))
(if fn (auto-save-file-name-p
(file-name-nondirectory fn)))))
"auto save file")))