From: "Jonathan Freidin" <jfreidin@comcast.net>
Subject: Re: NTemacs doesn't understand RCS
Date: Wed, 22 Dec 2004 00:47:46 -0500 [thread overview]
Message-ID: <001601c4e7e9$c3feabe0$6401a8c0@jfreidin1> (raw)
;;; Inspired by a post from Kevin Rodgers.
;;; Fix a problem in Kevin's code, that the paths in vc-rcs-master-templates
;;; are relative to the parent of the file or directory in the RCS link.
This
;;; causes "%sRCS/%s,v" and "%sRCS/%s" templates to fail because of the
extra
;;; "RCS". A "%s%s" (not in vc-rcs-master-templates) also fails because
;;; vc-check-master-templates ensures that the master file isn't the same as
;;; the source file, and it is in the way Kevin used it. Most everything
else
;;; is the way Kevin wrote it.
(defun vc-rcs-template-fn (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
;; Start in the parent directory so the template doesn't fail
on
;; the check for the identical file. This also allows using
;; vc-rcs-master-templates.
(concat
(with-temp-buffer
(insert-file-contents (expand-file-name "RCS" directory))
(buffer-substring (goto-char (point-min))
(progn (end-of-line) (point))))
"/..")))
;; 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 'vc-rcs-template-fn
vc-rcs-master-templates))))))
(setq vc-rcs-master-templates
(cons 'vc-rcs-template-fn vc-rcs-master-templates))
Jonathan
next reply other threads:[~2004-12-22 5:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-22 5:47 Jonathan Freidin [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-11-04 16:19 NTemacs doesn't understand RCS Scott Thibault
2004-11-04 18:46 ` Kevin Rodgers
2004-11-09 20:29 ` Scott Thibault
2004-11-09 23:03 ` Stefan Monnier
2004-11-10 0:45 ` Kevin Rodgers
2004-11-10 11:22 ` Scott Thibault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001601c4e7e9$c3feabe0$6401a8c0@jfreidin1' \
--to=jfreidin@comcast.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).