summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1992-10-20 18:43:33 +0000
committerRichard M. Stallman <rms@gnu.org>1992-10-20 18:43:33 +0000
commit8a2816daa69a7d51d3809a67b7fdf38f6bdbfeed (patch)
tree9dd3e62b2e7e651d279e1051fdc2570fe38f3110
parent68f5eb5a8de319f65cf2c3d7e8abafc083fc0021 (diff)
downloademacs-8a2816daa69a7d51d3809a67b7fdf38f6bdbfeed.tar.gz
(vc-registered): Look for handler only if file-name-handler-alist is bound.
-rw-r--r--lisp/vc-hooks.el23
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 @@
;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
;; Version: 4.0
-;; $Id: vc-hooks.el,v 1.3 1992/09/27 00:45:57 roland Exp rms $
+;; $Id: vc-hooks.el,v 1.4 1992/10/20 06:44:21 rms Exp rms $
;; This file is part of GNU Emacs.
@@ -65,14 +65,16 @@ the make-backup-files variable. Otherwise, prevents backups being made.")
;;; actual version-control code starts here
(defun vc-registered (file)
- (let (handler (handlers file-name-handler-alist))
- (save-match-data
- (while (and (consp handlers) (null handler))
- (if (and (consp (car handlers))
- (stringp (car (car handlers)))
- (string-match (car (car handlers)) file))
- (setq handler (cdr (car handlers))))
- (setq handlers (cdr handlers))))
+ (let (handler handlers)
+ (if (boundp 'file-name-handler-alist)
+ (save-match-data
+ (setq handlers file-name-handler-alist)
+ (while (and (consp handlers) (null handler))
+ (if (and (consp (car handlers))
+ (stringp (car (car handlers)))
+ (string-match (car (car handlers)) file))
+ (setq handler (cdr (car handlers))))
+ (setq handlers (cdr handlers)))))
(if handler
(funcall handler 'vc-registered file)
;; Search for a master corresponding to the given file
@@ -96,8 +98,7 @@ the make-backup-files variable. Otherwise, prevents backups being made.")
(file-attributes trial)))))
(throw 'found (cons trial (cdr s)))))))
vc-master-templates)
- nil)
- ))))
+ nil)))))
(defun vc-backend-deduce (file)
"Return the version-control type of a file, nil if it is not registered"