diff options
| -rw-r--r-- | lisp/vc-hooks.el | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el index bbaf0cfed08..36bf47a9648 100644 --- a/lisp/vc-hooks.el +++ b/lisp/vc-hooks.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> | 5 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> |
| 6 | ;; Version: 4.0 | 6 | ;; Version: 4.0 |
| 7 | 7 | ||
| 8 | ;; $Id: vc-hooks.el,v 1.3 1992/09/27 00:45:57 roland Exp rms $ | 8 | ;; $Id: vc-hooks.el,v 1.4 1992/10/20 06:44:21 rms Exp rms $ |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -65,14 +65,16 @@ the make-backup-files variable. Otherwise, prevents backups being made.") | |||
| 65 | ;;; actual version-control code starts here | 65 | ;;; actual version-control code starts here |
| 66 | 66 | ||
| 67 | (defun vc-registered (file) | 67 | (defun vc-registered (file) |
| 68 | (let (handler (handlers file-name-handler-alist)) | 68 | (let (handler handlers) |
| 69 | (save-match-data | 69 | (if (boundp 'file-name-handler-alist) |
| 70 | (while (and (consp handlers) (null handler)) | 70 | (save-match-data |
| 71 | (if (and (consp (car handlers)) | 71 | (setq handlers file-name-handler-alist) |
| 72 | (stringp (car (car handlers))) | 72 | (while (and (consp handlers) (null handler)) |
| 73 | (string-match (car (car handlers)) file)) | 73 | (if (and (consp (car handlers)) |
| 74 | (setq handler (cdr (car handlers)))) | 74 | (stringp (car (car handlers))) |
| 75 | (setq handlers (cdr handlers)))) | 75 | (string-match (car (car handlers)) file)) |
| 76 | (setq handler (cdr (car handlers)))) | ||
| 77 | (setq handlers (cdr handlers))))) | ||
| 76 | (if handler | 78 | (if handler |
| 77 | (funcall handler 'vc-registered file) | 79 | (funcall handler 'vc-registered file) |
| 78 | ;; Search for a master corresponding to the given file | 80 | ;; Search for a master corresponding to the given file |
| @@ -96,8 +98,7 @@ the make-backup-files variable. Otherwise, prevents backups being made.") | |||
| 96 | (file-attributes trial))))) | 98 | (file-attributes trial))))) |
| 97 | (throw 'found (cons trial (cdr s))))))) | 99 | (throw 'found (cons trial (cdr s))))))) |
| 98 | vc-master-templates) | 100 | vc-master-templates) |
| 99 | nil) | 101 | nil))))) |
| 100 | )))) | ||
| 101 | 102 | ||
| 102 | (defun vc-backend-deduce (file) | 103 | (defun vc-backend-deduce (file) |
| 103 | "Return the version-control type of a file, nil if it is not registered" | 104 | "Return the version-control type of a file, nil if it is not registered" |