Function: vc-dir--only-files-state-and-model
vc-dir--only-files-state-and-model is a byte-compiled function defined
in vc-dir.el.gz.
Signature
(vc-dir--only-files-state-and-model ONLY-FILES-LIST)
Documentation
Call vc-only-files-state-and-model as appropriate for VC-Dir buffers.
Offer to call vc-dir-hide-up-to-date if that might be useful.
If we did, remove up-to-date items from ONLY-FILES-LIST before passing
to vc-only-files-state-and-model.
There's usually no action to be taken on up-to-date or ignored
files, but a new user may include these in their VC-Dir fileset without
realizing it. To avoid the user having to know in advance that what
they must do is invoke x (vc-dir-hide-up-to-date) before v (vc-next-action), offer to invoke vc-dir-hide-up-to-date
for them, and also filter ONLY-FILES-LIST so as not to include entries
in those states. Only do this if there are both up-to-date and
non-up-to-date files in ONLY-FILES-LIST (in case we add a VC next action
for up-to-date and/or ignored files at some point).
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-dir.el.gz
(defun vc-dir--only-files-state-and-model (only-files-list)
"Call `vc-only-files-state-and-model' as appropriate for VC-Dir buffers.
Offer to call `vc-dir-hide-up-to-date' if that might be useful.
If we did, remove up-to-date items from ONLY-FILES-LIST before passing
to `vc-only-files-state-and-model'.
There's usually no action to be taken on `up-to-date' or `ignored'
files, but a new user may include these in their VC-Dir fileset without
realizing it. To avoid the user having to know in advance that what
they must do is invoke \\<vc-dir-mode-map>\\[vc-dir-hide-up-to-date] \
before \\[vc-next-action], offer to invoke `vc-dir-hide-up-to-date'
for them, and also filter ONLY-FILES-LIST so as not to include entries
in those states. Only do this if there are both up-to-date and
non-up-to-date files in ONLY-FILES-LIST (in case we add a VC next action
for `up-to-date' and/or `ignored' files at some point)."
(let (up-to-date other)
(dolist (entry only-files-list)
(push entry (if (memq (cdr entry) vc-dir--up-to-date-states)
up-to-date other)))
(vc-only-files-state-and-model
(if (or (null up-to-date) (null other)
(not (y-or-n-p "Clear up-to-date items before proceeding?")))
only-files-list
(vc-dir-hide-up-to-date)
other)
vc-dir-backend)))