From: Richard M. Stallman Date: Sun, 24 Apr 1994 10:00:51 +0000 (+0000) Subject: (vc-mode-line): Warn if file is not vc-registered X-Git-Tag: emacs-19.34~8772 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8d51c5cc397ed5b3a9db54d66c001f478c634538;p=emacs.git (vc-mode-line): Warn if file is not vc-registered but is a symlink to a vc-maintained file. --- 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." (require 'vc) (not (string-equal (user-login-name) (vc-locking-user file))) (setq buffer-read-only t)) + (and (null vc-type) + (file-symlink-p buffer-file-name) + (let ((link-type (vc-backend-deduce (file-symlink-p buffer-file-name)))) + (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))