Function: vc-dir-unmark-all-files
vc-dir-unmark-all-files is an interactive and byte-compiled function
defined in vc-dir.el.gz.
Signature
(vc-dir-unmark-all-files ARG)
Documentation
Unmark all files with the same state as the current one.
With prefix argument ARG, unmark all files. If the current entry is a directory, unmark all the child files.
The commands operate on files that are on the same state. This command is intended to make it easy to deselect all files that share the same state.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-dir.el.gz
(defun vc-dir-unmark-all-files (arg)
"Unmark all files with the same state as the current one.
With prefix argument ARG, unmark all files.
If the current entry is a directory, unmark all the child files.
The commands operate on files that are on the same state.
This command is intended to make it easy to deselect all files
that share the same state."
(interactive "P")
(if arg
(ewoc-map
(lambda (filearg)
(when (vc-dir-fileinfo->marked filearg)
(setf (vc-dir-fileinfo->marked filearg) nil)
t))
vc-ewoc)
(let* ((crt (ewoc-locate vc-ewoc))
(data (ewoc-data crt)))
(if (vc-dir-fileinfo->directory data)
;; It's a directory, unmark child files.
(while (setq crt (ewoc-next vc-ewoc crt))
(let ((crt-data (ewoc-data crt)))
(unless (vc-dir-fileinfo->directory crt-data)
(setf (vc-dir-fileinfo->marked crt-data) nil)
(ewoc-invalidate vc-ewoc crt))))
;; It's a file
(let ((crt-state (vc-dir-fileinfo->state (ewoc-data crt))))
(ewoc-map
(lambda (filearg)
(when (and (vc-dir-fileinfo->marked filearg)
(eq (vc-dir-fileinfo->state filearg) crt-state))
(setf (vc-dir-fileinfo->marked filearg) nil)
t))
vc-ewoc))))))