Function: vc-dir--children

vc-dir--children is a byte-compiled function defined in vc-dir.el.gz.

Signature

(vc-dir--children ARG &optional ONLY-MARKED)

Documentation

Return a list of children of ARG. If ONLY-MARKED, only those marked.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc-dir.el.gz
(defun vc-dir--children (arg &optional only-marked)
  "Return a list of children of ARG.  If ONLY-MARKED, only those marked."
  (let* ((argdir-re (concat "\\`"
                            (regexp-quote (vc-dir-node-directory arg))))
	 (is-child t)
	 (crt arg)
	 (found nil))
    (while (and is-child
		(setq crt (ewoc-next vc-ewoc crt)))
      (if (string-match argdir-re (vc-dir-node-directory crt))
	  (when (or (not only-marked)
                    (vc-dir-fileinfo->marked (ewoc-data crt)))
	    (push crt found))
	;; We are done, we got to an entry that is not a child of `arg'.
	(setq is-child nil)))
    found))