aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-04-24 10:00:51 +0000
committerRichard M. Stallman1994-04-24 10:00:51 +0000
commit8d51c5cc397ed5b3a9db54d66c001f478c634538 (patch)
tree20d4ce97ccd959d052b04b35eabdfe6342818cfc
parent147a661590391d5afc3f94c55ce2d3bd06251fc7 (diff)
downloademacs-8d51c5cc397ed5b3a9db54d66c001f478c634538.tar.gz
emacs-8d51c5cc397ed5b3a9db54d66c001f478c634538.zip
(vc-mode-line): Warn if file is not vc-registered
but is a symlink to a vc-maintained file.
-rw-r--r--lisp/vc-hooks.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index 6e1878ada02..48e3ea6424d 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -154,6 +154,12 @@ visiting FILE."
154 (require 'vc) 154 (require 'vc)
155 (not (string-equal (user-login-name) (vc-locking-user file))) 155 (not (string-equal (user-login-name) (vc-locking-user file)))
156 (setq buffer-read-only t)) 156 (setq buffer-read-only t))
157 (and (null vc-type)
158 (file-symlink-p buffer-file-name)
159 (let ((link-type (vc-backend-deduce (file-symlink-p buffer-file-name))))
160 (if link-type
161 (message "Warning: symbolic link to %s-controlled source file"
162 link-type))))
157 (force-mode-line-update) 163 (force-mode-line-update)
158 ;;(set-buffer-modified-p (buffer-modified-p)) ;;use this if Emacs 18 164 ;;(set-buffer-modified-p (buffer-modified-p)) ;;use this if Emacs 18
159 vc-type)) 165 vc-type))