From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jonathan Freidin" Newsgroups: gmane.emacs.help Subject: Re: NTemacs doesn't understand RCS Date: Wed, 22 Dec 2004 00:47:46 -0500 Message-ID: <001601c4e7e9$c3feabe0$6401a8c0@jfreidin1> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1103694778 23433 80.91.229.6 (22 Dec 2004 05:52:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Dec 2004 05:52:58 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 22 06:52:52 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CgzQZ-0002Id-00 for ; Wed, 22 Dec 2004 06:52:51 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cgzb6-0002Up-Sb for geh-help-gnu-emacs@m.gmane.org; Wed, 22 Dec 2004 01:03:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1Cgzao-0002S8-8D for help-gnu-emacs@gnu.org; Wed, 22 Dec 2004 01:03:26 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1Cgzam-0002RP-DH for help-gnu-emacs@gnu.org; Wed, 22 Dec 2004 01:03:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cgzam-0002Qg-3o for help-gnu-emacs@gnu.org; Wed, 22 Dec 2004 01:03:24 -0500 Original-Received: from [204.127.202.55] (helo=sccrmhc11.comcast.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CgzNE-0006ar-BI for help-gnu-emacs@gnu.org; Wed, 22 Dec 2004 00:49:24 -0500 Original-Received: from jfreidin1 (h000625bf449a.ne.client2.attbi.com[66.30.33.63]) by comcast.net (sccrmhc11) with SMTP id <2004122205492201100augive>; Wed, 22 Dec 2004 05:49:22 +0000 Original-To: , X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:22914 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:22914 ;;; 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