# HG changeset patch # User Dave Love # Date 886602015 0 # Node ID d69034fe59c25708c834745b542b00a7c3f04119 # Parent b60871b4710f39831c94cb426264224ca7945e41 (vc-ignore-vc-files): New variable. (vc-file-hook, vc-file-not-found-hook): Use it. diff -r b60871b4710f -r d69034fe59c2 lisp/vc-hooks.el --- a/lisp/vc-hooks.el Wed Feb 04 11:25:47 1998 +0000 +++ b/lisp/vc-hooks.el Wed Feb 04 14:20:15 1998 +0000 @@ -1,6 +1,6 @@ ;;; vc-hooks.el --- resident support for version-control -;; Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998 Free Software Foundation, Inc. ;; Author: Eric S. Raymond ;; Maintainer: Andre Spiegel @@ -116,6 +116,15 @@ :type 'boolean :group 'vc) +(defcustom vc-ignore-vc-files nil + "*If non-nil don't look for version control information when finding files. + +It may be useful to set this if (say) you edit files in a directory +containing corresponding RCS files but don't have RCS available; +similarly for other version control systems." + :type 'boolean + :group 'vc) + (defun vc-mistrust-permissions (file) ;; Access function to the above. (or (eq vc-mistrust-permissions 't) @@ -1009,7 +1018,7 @@ ;; Recompute whether file is version controlled, ;; if user has killed the buffer and revisited. (cond - (buffer-file-name + ((and (not vc-ignore-vc-files) buffer-file-name) (vc-file-clearprops buffer-file-name) (cond ((vc-backend buffer-file-name) @@ -1052,7 +1061,8 @@ (defun vc-file-not-found-hook () "When file is not found, try to check it out from RCS or SCCS. Returns t if checkout was successful, nil otherwise." - (if (vc-backend buffer-file-name) + (if (and (not vc-ignore-vc-files) + (vc-backend buffer-file-name)) (save-excursion (require 'vc) (setq default-directory (file-name-directory (buffer-file-name)))