Function: vc-tag-precondition

vc-tag-precondition is a byte-compiled function defined in vc.el.gz.

Signature

(vc-tag-precondition DIR)

Documentation

Scan the tree below DIR, looking for files not up-to-date.

If any file is not up-to-date, return the name of the first such file.
(This means, neither tag creation nor retrieval is allowed.)
If one or more of the files are currently visited, return visited. Otherwise, return nil.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc.el.gz
;; Named-configuration entry points

(defun vc-tag-precondition (dir)
  "Scan the tree below DIR, looking for files not up-to-date.
If any file is not up-to-date, return the name of the first such file.
\(This means, neither tag creation nor retrieval is allowed.)
If one or more of the files are currently visited, return `visited'.
Otherwise, return nil."
  (let ((status nil))
    (catch 'vc-locked-example
      (vc-file-tree-walk
       dir
       (lambda (f)
	 (if (not (vc-up-to-date-p f)) (throw 'vc-locked-example f)
	   (when (get-file-buffer f) (setq status 'visited)))))
      status)))