]> git.eshelyaron.com Git - emacs.git/commitdiff
(vc-mode-line, vc-find-file-hook): Moved the test for
authorRichard M. Stallman <rms@gnu.org>
Tue, 18 Jul 1995 20:55:46 +0000 (20:55 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 18 Jul 1995 20:55:46 +0000 (20:55 +0000)
version-controlled symbolic link from the former to the latter.

lisp/vc-hooks.el

index f4153a00eed7fb229da7021e11708f141baca353..88ef2dbe1f5b40c7b130b2c7ca1cf435c8bb1cb0 100644 (file)
@@ -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)