]> code.delx.au - gnu-emacs/commitdiff
Fix use of buffer-file-truename in vc-find-file-hook (tiny change).
authorYuya Nishihara <yuya@tcha.org>
Sat, 1 Dec 2012 13:25:13 +0000 (21:25 +0800)
committerChong Yidong <cyd@gnu.org>
Sat, 1 Dec 2012 13:25:13 +0000 (21:25 +0800)
* lisp/vc/vc-hooks.el (vc-find-file-hook): Expand buffer-file-truename
before using it for comparison.

Fixes: debbugs:5297
lisp/ChangeLog
lisp/vc/vc-hooks.el

index c2e5e9fa8ce9a792c2031f4ca01ad2b69b64b894..ec7791597f07b1b882b430e910e25312f3da1745 100644 (file)
@@ -1,3 +1,8 @@
+2012-12-01  Yuya Nishihara  <yuya@tcha.org>  (tiny change)
+
+       * vc/vc-hooks.el (vc-find-file-hook): Expand buffer-file-truename
+       before using it for comparison (Bug#5297).
+
 2012-12-01  Jari Aalto  <jari.aalto@cante.net>
 
        * textmodes/css-mode.el (css-current-defun-name): New function.
index ef900cb5257ddfbb01c736ac85443c5db1b80274..40a1f3db9823bc5bee19b96d64d09244a7c6f90f 100644 (file)
@@ -858,8 +858,9 @@ 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 ((link-type (and (not (equal buffer-file-name buffer-file-truename))
-                             (vc-backend buffer-file-truename))))
+       ((let* ((truename (expand-file-name buffer-file-truename))
+              (link-type (and (not (equal buffer-file-name truename))
+                              (vc-backend truename))))
          (cond ((not link-type) nil)   ;Nothing to do.
                ((eq vc-follow-symlinks nil)
                 (message