aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond2007-10-11 11:22:19 +0000
committerEric S. Raymond2007-10-11 11:22:19 +0000
commit44cd688b7bd379472f900fa1571ed17fd649730e (patch)
tree3bd62dd42c1424ceef092e5064d19fae43ed9861
parent5ffc62f5e67eae370dd19a07ad5629975ad9b2ea (diff)
downloademacs-44cd688b7bd379472f900fa1571ed17fd649730e.tar.gz
emacs-44cd688b7bd379472f900fa1571ed17fd649730e.zip
Robustify a bit against filenames with no directory component.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/vc-hooks.el3
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1eeb9820beb..63f8b7a2a65 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12007-10-11 Eric S. Raymond <esr@snark.thyrsus.com>
2
3 * vc-hooks.el (vc-registered): Robustify this function a bit
4 against filenames with no directory component.
5
12007-10-11 Stefan Monnier <monnier@iro.umontreal.ca> 62007-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
2 7
3 * international/characters.el: Undo unwanted and unexplained change. 8 * international/characters.el: Undo unwanted and unexplained change.
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index d2825f9b5bb..64ce29ddaf4 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -362,7 +362,8 @@ file was previously registered under a certain backend, then that
362backend is tried first." 362backend is tried first."
363 (let (handler) 363 (let (handler)
364 (cond 364 (cond
365 ((string-match vc-ignore-dir-regexp (file-name-directory file)) nil) 365 ((and (file-name-directory file) (string-match vc-ignore-dir-regexp (file-name-directory file)))
366 nil)
366 ((and (boundp 'file-name-handler-alist) 367 ((and (boundp 'file-name-handler-alist)
367 (setq handler (find-file-name-handler file 'vc-registered))) 368 (setq handler (find-file-name-handler file 'vc-registered)))
368 ;; handler should set vc-backend and return t if registered 369 ;; handler should set vc-backend and return t if registered