diff options
| author | Dave Love | 1998-02-04 14:20:15 +0000 |
|---|---|---|
| committer | Dave Love | 1998-02-04 14:20:15 +0000 |
| commit | b499b50bea1f8890892077391074ad6bf5373488 (patch) | |
| tree | ade0bec9d965cadbfc31c346028a6f4598f16a10 | |
| parent | 4a027a0dfb5721eb98b298f6330fe00511ca428c (diff) | |
| download | emacs-b499b50bea1f8890892077391074ad6bf5373488.tar.gz emacs-b499b50bea1f8890892077391074ad6bf5373488.zip | |
(vc-ignore-vc-files): New variable.
(vc-file-hook, vc-file-not-found-hook): Use it.
| -rw-r--r-- | lisp/vc-hooks.el | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index 0898c2dbd10..bf752180920 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; vc-hooks.el --- resident support for version-control | 1 | ;;; vc-hooks.el --- resident support for version-control |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> | 5 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> |
| 6 | ;; Maintainer: Andre Spiegel <spiegel@inf.fu-berlin.de> | 6 | ;; Maintainer: Andre Spiegel <spiegel@inf.fu-berlin.de> |
| @@ -116,6 +116,15 @@ See also variable `vc-consult-headers'." | |||
| 116 | :type 'boolean | 116 | :type 'boolean |
| 117 | :group 'vc) | 117 | :group 'vc) |
| 118 | 118 | ||
| 119 | (defcustom vc-ignore-vc-files nil | ||
| 120 | "*If non-nil don't look for version control information when finding files. | ||
| 121 | |||
| 122 | It may be useful to set this if (say) you edit files in a directory | ||
| 123 | containing corresponding RCS files but don't have RCS available; | ||
| 124 | similarly for other version control systems." | ||
| 125 | :type 'boolean | ||
| 126 | :group 'vc) | ||
| 127 | |||
| 119 | (defun vc-mistrust-permissions (file) | 128 | (defun vc-mistrust-permissions (file) |
| 120 | ;; Access function to the above. | 129 | ;; Access function to the above. |
| 121 | (or (eq vc-mistrust-permissions 't) | 130 | (or (eq vc-mistrust-permissions 't) |
| @@ -1009,7 +1018,7 @@ control system name." | |||
| 1009 | ;; Recompute whether file is version controlled, | 1018 | ;; Recompute whether file is version controlled, |
| 1010 | ;; if user has killed the buffer and revisited. | 1019 | ;; if user has killed the buffer and revisited. |
| 1011 | (cond | 1020 | (cond |
| 1012 | (buffer-file-name | 1021 | ((and (not vc-ignore-vc-files) buffer-file-name) |
| 1013 | (vc-file-clearprops buffer-file-name) | 1022 | (vc-file-clearprops buffer-file-name) |
| 1014 | (cond | 1023 | (cond |
| 1015 | ((vc-backend buffer-file-name) | 1024 | ((vc-backend buffer-file-name) |
| @@ -1052,7 +1061,8 @@ control system name." | |||
| 1052 | (defun vc-file-not-found-hook () | 1061 | (defun vc-file-not-found-hook () |
| 1053 | "When file is not found, try to check it out from RCS or SCCS. | 1062 | "When file is not found, try to check it out from RCS or SCCS. |
| 1054 | Returns t if checkout was successful, nil otherwise." | 1063 | Returns t if checkout was successful, nil otherwise." |
| 1055 | (if (vc-backend buffer-file-name) | 1064 | (if (and (not vc-ignore-vc-files) |
| 1065 | (vc-backend buffer-file-name)) | ||
| 1056 | (save-excursion | 1066 | (save-excursion |
| 1057 | (require 'vc) | 1067 | (require 'vc) |
| 1058 | (setq default-directory (file-name-directory (buffer-file-name))) | 1068 | (setq default-directory (file-name-directory (buffer-file-name))) |