]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-mode-line): Warn if file is not vc-registered
authorRichard M. Stallman <rms@gnu.org>
Sun, 24 Apr 1994 10:00:51 +0000 (10:00 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 24 Apr 1994 10:00:51 +0000 (10:00 +0000)
but is a symlink to a vc-maintained file.

lisp/vc-hooks.el

index 6e1878ada0238b0b395d17aa26574c3e1129b059..48e3ea6424d1566e783c77ff64a75c35169a9522 100644 (file)
@@ -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))