help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NTemacs doesn't understand RCS


From: Kevin Rodgers
Subject: Re: NTemacs doesn't understand RCS
Date: Thu, 04 Nov 2004 11:46:05 -0700
User-agent: Mozilla Thunderbird 0.8 (X11/20040916)

Scott Thibault wrote:
> I'm using a version of RCS that allows you to create a text file
> called RCS that contains a pointer to the RCS directory rather than a
> real directory - a work around for not having links on Windows.
>
> So, the question is how do I get emacs to understand these link files?
>  Out-of-the-box, when I try C-x v v, the ci command fails with the
> message \src\RCS\file.c,v already exists.  I assume because emacs
> doesn't recognize the RCS "link" and tries to do a ci -i.

Try this (untested!):

(defun gmvhdl-rcs-template (directory file)
  "Return non-nil if FILE in DIRECTORY is under RCS control."
  (if (file-regular-p (expand-file-name "RCS" directory))
      (let ((rcs-directory
             (with-temp-buffer
               (insert-file-contents (expand-file-name "RCS" directory))
               (buffer-string))))
        ;; in case rcs-directory is relative:
        (setq rcs-directory
              (expand-file-name rcs-directory directory))
        ;; check rcs-directory/FILE against the default templates:
        (if (file-directory-p rcs-directory)
(vc-check-master-templates (expand-file-name file rcs-directory)
                                       (remq 'gmvhdl-rcs-template
                                             vc-rcs-master-templates))))))

(setq vc-rcs-master-templates
      (cons 'gmvhdl-rcs-template vc-rcs-master-templates))

--
Kevin Rodgers


reply via email to

[Prev in Thread] Current Thread [Next in Thread]