summaryrefslogtreecommitdiff
path: root/lisp/vc-hooks.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2008-11-22 05:23:42 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2008-11-22 05:23:42 +0000
commit845895c6af1dacec51d6befec01874db9f1fdc29 (patch)
treed8980793667337b1d6af9432b2b06b78e8328bca /lisp/vc-hooks.el
parentad48abbdac5d4a57b9e0dd655beed734f2cd00c0 (diff)
downloademacs-845895c6af1dacec51d6befec01874db9f1fdc29.tar.gz
(vc-follow-link, vc-find-file-hook):
Use buffer-file-truename to handle symlinks in any part of the filename.
Diffstat (limited to 'lisp/vc-hooks.el')
-rw-r--r--lisp/vc-hooks.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index fdee4c4680e..85f665bc9de 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -850,8 +850,7 @@ This function assumes that the file is registered."
"If current buffer visits a symbolic link, visit the real file.
If the real file is already visited in another buffer, make that buffer
current, and kill the buffer that visits the link."
- (let* ((truename (abbreviate-file-name (file-chase-links buffer-file-name)))
- (true-buffer (find-buffer-visiting truename))
+ (let* ((true-buffer (find-buffer-visiting buffer-file-truename))
(this-buffer (current-buffer)))
(if (eq true-buffer this-buffer)
(progn
@@ -885,8 +884,8 @@ 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 (vc-backend buffer-file-name) 'find-file-hook))
- ((let ((link-type (and (file-symlink-p buffer-file-name)
- (vc-backend (file-chase-links buffer-file-name)))))
+ ((let ((link-type (and (not (equal buffer-file-name buffer-file-truename))
+ (vc-backend buffer-file-truename))))
(cond ((not link-type) nil) ;Nothing to do.
((eq vc-follow-symlinks nil)
(message