1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-19 14:41:11 -08:00

Robustify a bit against filenames with no directory component.

This commit is contained in:
Eric S. Raymond 2007-10-11 11:22:19 +00:00
parent 5ffc62f5e6
commit 44cd688b7b
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2007-10-11 Eric S. Raymond <esr@snark.thyrsus.com>
* vc-hooks.el (vc-registered): Robustify this function a bit
against filenames with no directory component.
2007-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
* international/characters.el: Undo unwanted and unexplained change.

View file

@ -362,7 +362,8 @@ file was previously registered under a certain backend, then that
backend is tried first."
(let (handler)
(cond
((string-match vc-ignore-dir-regexp (file-name-directory file)) nil)
((and (file-name-directory file) (string-match vc-ignore-dir-regexp (file-name-directory file)))
nil)
((and (boundp 'file-name-handler-alist)
(setq handler (find-file-name-handler file 'vc-registered)))
;; handler should set vc-backend and return t if registered