Function: speedbar-check-vc

speedbar-check-vc is a byte-compiled function defined in speedbar.el.gz.

Signature

(speedbar-check-vc)

Documentation

Scan all files in a directory, and for each see if it's checked out.

See speedbar-this-file-in-vc and speedbar-vc-check-dir-p for how to add more types of version control systems.

Source Code

;; Defined in /usr/src/emacs/lisp/speedbar.el.gz
(defun speedbar-check-vc ()
  "Scan all files in a directory, and for each see if it's checked out.
See `speedbar-this-file-in-vc' and `speedbar-vc-check-dir-p' for how
to add more types of version control systems."
  ;; Check for to-do to be reset.  If reset but no RCS is available
  ;; then set to nil (do nothing) otherwise, start at the beginning
  (save-excursion
    (if speedbar-buffer (set-buffer speedbar-buffer))
    (if (and speedbar-vc-do-check (eq speedbar-vc-to-do-point t)
	     (speedbar-vc-check-dir-p default-directory)
	     (not (or (and (featurep 'ange-ftp)
			   (string-match
			    (car (symbol-value 'ange-ftp-name-format))
			    (expand-file-name default-directory)))
		      ;; efs support: Bob Weiner
		      (and (featurep 'efs)
			   (string-match
			    (let ((reg (symbol-value 'efs-directory-regexp)))
			      (if (stringp reg)
				  reg
				(car reg)))
			    (expand-file-name default-directory))))))
	(setq speedbar-vc-to-do-point 0))
    (if (numberp speedbar-vc-to-do-point)
	(progn
	  (goto-char speedbar-vc-to-do-point)
	  (while (and (not (input-pending-p))
		      (re-search-forward "^\\([0-9]+\\):\\s-*\\[[+?-]\\] "
					 nil t))
	    (setq speedbar-vc-to-do-point (point))
	    (if (speedbar-check-vc-this-line (match-string 1))
		(speedbar-add-indicator speedbar-vc-indicator
					(regexp-quote speedbar-vc-indicator))
	      (speedbar-add-indicator " "
				      (regexp-quote speedbar-vc-indicator))))
	  (if (input-pending-p)
	      ;; return that we are incomplete
	      nil
	    ;; we are done, set to-do to nil
	    (setq speedbar-vc-to-do-point nil)
	    ;; and return t
	    t))
      t)))