From 8d51c5cc397ed5b3a9db54d66c001f478c634538 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 24 Apr 1994 10:00:51 +0000 Subject: [PATCH] (vc-mode-line): Warn if file is not vc-registered but is a symlink to a vc-maintained file. --- lisp/vc-hooks.el | 6 ++++++ 1 file changed, 6 insertions(+) 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)) -- 2.39.5