Function: vc-dir-child-files-and-states
vc-dir-child-files-and-states is a byte-compiled function defined in
vc-dir.el.gz.
Signature
(vc-dir-child-files-and-states)
Documentation
Return the state of one or more files for the current entry.
If the entry is a directory, return the list of states of its child files, where each file is described by a cons of the form (FILE . STATE). If the entry is a file, return a single cons cell (FILE . STATE) for that file.
Source Code
;; Defined in /usr/src/emacs/lisp/vc/vc-dir.el.gz
(defun vc-dir-child-files-and-states ()
"Return the state of one or more files for the current entry.
If the entry is a directory, return the list of states of its child
files, where each file is described by a cons of the form (FILE . STATE).
If the entry is a file, return a single cons cell (FILE . STATE) for
that file."
(let* ((crt (ewoc-locate vc-ewoc))
(crt-data (ewoc-data crt))
result)
(if (vc-dir-fileinfo->directory crt-data)
(let* ((dir (vc-dir-fileinfo->directory crt-data))
;; (dirlen (length dir))
data)
(while
(and (setq crt (ewoc-next vc-ewoc crt))
(string-prefix-p dir (progn
(setq data (ewoc-data crt))
(vc-dir-node-directory crt))))
(unless (vc-dir-fileinfo->directory data)
(push
(cons (expand-file-name (vc-dir-fileinfo->name data))
(vc-dir-fileinfo->state data))
result))))
(push
(cons (expand-file-name (vc-dir-fileinfo->name crt-data))
(vc-dir-fileinfo->state crt-data)) result))
(nreverse result)))