diff options
| author | Stefan Monnier | 2004-03-15 03:53:05 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2004-03-15 03:53:05 +0000 |
| commit | b8d1db7730a3206a556d5cddaf15f85057d290c5 (patch) | |
| tree | 5d67d6e2a8d7ba0f49823996d6e13fe76bea1ce6 | |
| parent | 0f6c7af8d6fedaa93266e22b2a2f458b5a4d58b5 (diff) | |
| download | emacs-b8d1db7730a3206a556d5cddaf15f85057d290c5.tar.gz emacs-b8d1db7730a3206a556d5cddaf15f85057d290c5.zip | |
(vc-handled-backends): Add Arch. Move MCVS down.
(vc-default-find-file-hook): New fun.
(vc-find-file-hook): Call new find-file-hook operation.
| -rw-r--r-- | lisp/vc-hooks.el | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index c9603d68e25..1354d442e26 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | ;;; vc-hooks.el --- resident support for version-control | 1 | ;;; vc-hooks.el --- resident support for version-control |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992,93,94,95,96,98,99,2000,2003 | 3 | ;; Copyright (C) 1992,93,94,95,96,98,99,2000,03,2004 |
| 4 | ;; Free Software Foundation, Inc. | 4 | ;; Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: FSF (see vc.el for full credits) | 6 | ;; Author: FSF (see vc.el for full credits) |
| 7 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> | 7 | ;; Maintainer: Andre Spiegel <spiegel@gnu.org> |
| 8 | 8 | ||
| 9 | ;; $Id: vc-hooks.el,v 1.159 2003/08/30 10:56:38 eliz Exp $ | 9 | ;; $Id: vc-hooks.el,v 1.160 2003/09/01 15:45:17 miles Exp $ |
| 10 | 10 | ||
| 11 | ;; This file is part of GNU Emacs. | 11 | ;; This file is part of GNU Emacs. |
| 12 | 12 | ||
| @@ -52,7 +52,8 @@ BACKEND, use `vc-handled-backends'.") | |||
| 52 | (defvar vc-header-alist ()) | 52 | (defvar vc-header-alist ()) |
| 53 | (make-obsolete-variable 'vc-header-alist 'vc-BACKEND-header) | 53 | (make-obsolete-variable 'vc-header-alist 'vc-BACKEND-header) |
| 54 | 54 | ||
| 55 | (defcustom vc-handled-backends '(RCS CVS SVN MCVS SCCS) | 55 | (defcustom vc-handled-backends '(RCS CVS SVN SCCS Arch MCVS) |
| 56 | ;; Arch and MCVS come last because they are per-tree rather than per-dir. | ||
| 56 | "*List of version control backends for which VC will be used. | 57 | "*List of version control backends for which VC will be used. |
| 57 | Entries in this list will be tried in order to determine whether a | 58 | Entries in this list will be tried in order to determine whether a |
| 58 | file is under that sort of version control. | 59 | file is under that sort of version control. |
| @@ -698,6 +699,9 @@ current, and kill the buffer that visits the link." | |||
| 698 | (set-buffer true-buffer) | 699 | (set-buffer true-buffer) |
| 699 | (kill-buffer this-buffer)))) | 700 | (kill-buffer this-buffer)))) |
| 700 | 701 | ||
| 702 | (defun vc-default-find-file-hook (backend) | ||
| 703 | nil) | ||
| 704 | |||
| 701 | (defun vc-find-file-hook () | 705 | (defun vc-find-file-hook () |
| 702 | "Function for `find-file-hook' activating VC mode if appropriate." | 706 | "Function for `find-file-hook' activating VC mode if appropriate." |
| 703 | ;; Recompute whether file is version controlled, | 707 | ;; Recompute whether file is version controlled, |
| @@ -713,7 +717,9 @@ current, and kill the buffer that visits the link." | |||
| 713 | (unless vc-make-backup-files | 717 | (unless vc-make-backup-files |
| 714 | ;; Use this variable, not make-backup-files, | 718 | ;; Use this variable, not make-backup-files, |
| 715 | ;; because this is for things that depend on the file name. | 719 | ;; because this is for things that depend on the file name. |
| 716 | (set (make-local-variable 'backup-inhibited) t))) | 720 | (set (make-local-variable 'backup-inhibited) t)) |
| 721 | ;; Let the backend setup any buffer-local things he needs. | ||
| 722 | (vc-call-backend (vc-backend buffer-file-name) 'find-file-hook)) | ||
| 717 | ((let* ((link (file-symlink-p buffer-file-name)) | 723 | ((let* ((link (file-symlink-p buffer-file-name)) |
| 718 | (link-type (and link (vc-backend (file-chase-links link))))) | 724 | (link-type (and link (vc-backend (file-chase-links link))))) |
| 719 | (cond ((not link-type) nil) ;Nothing to do. | 725 | (cond ((not link-type) nil) ;Nothing to do. |