Function: cvs-reread-cvsrc

cvs-reread-cvsrc is an interactive and byte-compiled function defined in pcvs.el.gz.

Signature

(cvs-reread-cvsrc)

Documentation

Reset the default arguments to those in the cvs-cvsrc-file.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/vc/pcvs.el.gz
(defun cvs-reread-cvsrc ()
  "Reset the default arguments to those in the `cvs-cvsrc-file'."
  (interactive)
  (condition-case nil
      (with-temp-buffer
	(insert-file-contents cvs-cvsrc-file)
	;; fetch the values
	(dolist (cmd '("cvs" "checkout" "status" "log" "diff" "tag"
		       "add" "commit" "remove" "update"))
	  (goto-char (point-min))
	  (when (re-search-forward
		 (concat "^" cmd "\\(\\s-+\\(.*\\)\\)?$") nil t)
	    (let* ((sym (intern (concat "cvs-" cmd "-flags")))
		   (val (split-string-and-unquote (or (match-string 2) ""))))
	      (cvs-flags-set sym 0 val))))
	;; ensure that cvs doesn't have -q or -Q
	(cvs-flags-set 'cvs-cvs-flags 0
		       (cons "-f"
			     (cdr (cvs-partition
				   (lambda (x) (member x '("-q" "-Q" "-f")))
				   (cvs-flags-query 'cvs-cvs-flags
						    nil 'noquery))))))
      (file-error nil)))