summaryrefslogtreecommitdiff
path: root/lisp/vc-hooks.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-07-18 20:55:46 +0000
committerRichard M. Stallman <rms@gnu.org>1995-07-18 20:55:46 +0000
commit11e56b3df6d41835083419578e8e83c610b5efe2 (patch)
tree807a9a68b75e3d29a9e31ebb59a151dfd042a332 /lisp/vc-hooks.el
parent3264a308cbf110613432adbd71f49781064e75c2 (diff)
downloademacs-11e56b3df6d41835083419578e8e83c610b5efe2.tar.gz
(vc-mode-line, vc-find-file-hook): Moved the test for
version-controlled symbolic link from the former to the latter.
Diffstat (limited to 'lisp/vc-hooks.el')
-rw-r--r--lisp/vc-hooks.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index f4153a00eed..88ef2dbe1f5 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -746,13 +746,6 @@ control system name."
(zerop (user-uid))
(not (equal (user-login-name) (vc-locking-user file)))
(setq buffer-read-only t))
- (and (null vc-type)
- (file-symlink-p file)
- (let ((link-type (vc-backend (file-symlink-p file))))
- (if link-type
- (message
- "Warning: symbolic link to %s-controlled source file"
- link-type))))
(force-mode-line-update)
;;(set-buffer-modified-p (buffer-modified-p)) ;;use this if Emacs 18
vc-type))
@@ -800,7 +793,13 @@ control system name."
;; Use this variable, not make-backup-files,
;; because this is for things that depend on the file name.
(make-local-variable 'backup-inhibited)
- (setq backup-inhibited t))))))))
+ (setq backup-inhibited t))))
+ ((let* ((link (file-symlink-p buffer-file-name))
+ (link-type (and link (vc-backend link))))
+ (if link-type
+ (message
+ "Warning: symbolic link to %s-controlled source file"
+ link-type))))))))
(add-hook 'find-file-hooks 'vc-find-file-hook)