diff options
| author | Eric S. Raymond | 2007-10-11 11:22:19 +0000 |
|---|---|---|
| committer | Eric S. Raymond | 2007-10-11 11:22:19 +0000 |
| commit | 44cd688b7bd379472f900fa1571ed17fd649730e (patch) | |
| tree | 3bd62dd42c1424ceef092e5064d19fae43ed9861 | |
| parent | 5ffc62f5e67eae370dd19a07ad5629975ad9b2ea (diff) | |
| download | emacs-44cd688b7bd379472f900fa1571ed17fd649730e.tar.gz emacs-44cd688b7bd379472f900fa1571ed17fd649730e.zip | |
Robustify a bit against filenames with no directory component.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/vc-hooks.el | 3 |
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 @@ | |||
| 1 | 2007-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 | |||
| 1 | 2007-10-11 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2007-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 | |||
| 362 | backend is tried first." | 362 | backend 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 |