Function: vc-cvs-annotate-command

vc-cvs-annotate-command is a byte-compiled function defined in vc-cvs.el.gz.

Signature

(vc-cvs-annotate-command FILE BUFFER &optional REVISION)

Documentation

Execute "cvs annotate" on FILE, inserting the contents in BUFFER.

Optional arg REVISION is a revision to annotate from.

Source Code

;; Defined in /usr/src/emacs/lisp/vc/vc-cvs.el.gz
(defun vc-cvs-annotate-command (file buffer &optional revision)
  "Execute \"cvs annotate\" on FILE, inserting the contents in BUFFER.
Optional arg REVISION is a revision to annotate from."
  (apply #'vc-cvs-command buffer
	 (if (vc-cvs-stay-local-p file)
	     'async 0)
	 file "annotate"
	 (append (vc-switches 'cvs 'annotate)
		 (if revision (list (concat "-r" revision)))))
  ;; Strip the leading few lines.
  (let ((proc (get-buffer-process buffer)))
    (if proc
        ;; If running asynchronously, use a process filter.
        (add-function :around (process-filter proc)
                      #'vc-cvs-annotate-process-filter)
      (with-current-buffer buffer
        (goto-char (point-min))
        (re-search-forward vc-cvs-annotate-first-line-re)
        (delete-region (point-min) (1- (point)))))))