;;;; configure vc to suit me ;;; Time-stamp: <2006-11-15 21:10:35 jcgs> (if (not (string= (system-name) "MAYO")) (progn ;; we patch over a function in this, so load the original first (require 'vc) (setq vc-make-backup-files t vc-command-messages t ) ;; make sure CVS is second (after DARCS) or first if DARCS isn't yet there (if (eq (car vc-handled-backends) 'DARCS) (rplacd vc-handled-backends (cons 'CVS (delq 'CVS (cdr vc-handled-backends)))) (setq vc-handled-backends (cons 'CVS (delq 'CVS vc-handled-backends)))) (define-key-after global-map [ ;; menu-bar vc ] (cons "VC" vc-menu-map) t) (defun vc-watch (&optional cancel) "Set a watch on the current file; or with optional/prefix arg, remove the watch." (interactive "P") (or buffer-file-name (error "No visited file")) (let* ((file buffer-file-name) (master (vc-name file))) (vc-backend-dispatch file (progn;; sccs ) (progn;; rcs ) (progn;; cvs (apply 'vc-do-command nil 0 "cvs" file 'WORKFILE;; CVS "add" (and comment (string-match "[^\t\n ]" comment) (concat "-m" comment)) switches) )))) (defvar vc-after-register-hook nil "List of functions to run after registering a file with the source control system. This could, for example, arrange for the file to be watched.") (defun vc-admin (file rev &optional comment) "Check a file into your version-control system. FILE is the unmodified name of the file. REV should be the base version level to check it in under. COMMENT, if specified, is the checkin comment." (vc-start-entry file rev (or comment (not vc-initial-comment)) "Enter initial comment." 'vc-backend-admin 'vc-after-register-hook)) ))