From: Michael Albinus Date: Thu, 7 Feb 2013 08:50:04 +0000 (+0100) Subject: * vc/vc-hooks.el (vc-find-file-hook): `buffer-file-truename' can X-Git-Tag: emacs-24.3.90~173^2~7^2~134 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fed000725c6fc60e3919209779d60ec3adf5cb10;p=emacs.git * vc/vc-hooks.el (vc-find-file-hook): `buffer-file-truename' can be nil. Handle this. (Bug#13636) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a0e88362c4b..4211901d64f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-02-07 Michael Albinus + + * vc/vc-hooks.el (vc-find-file-hook): `buffer-file-truename' can + be nil. Handle this. (Bug#13636) + 2013-02-07 Richard Stallman * mail/rmail.el (rmail-variables): Specify `no-conversion' for diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 818b37b3c34..5c8a4515b7e 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -858,8 +858,10 @@ current, and kill the buffer that visits the link." (set (make-local-variable 'backup-inhibited) t)) ;; Let the backend setup any buffer-local things he needs. (vc-call-backend backend 'find-file-hook)) - ((let* ((truename (expand-file-name buffer-file-truename)) - (link-type (and (not (equal buffer-file-name truename)) + ((let* ((truename (and buffer-file-truename + (expand-file-name buffer-file-truename))) + (link-type (and truename + (not (equal buffer-file-name truename)) (vc-backend truename)))) (cond ((not link-type) nil) ;Nothing to do. ((eq vc-follow-symlinks nil)