mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(vc-mode-line): Warn if file is not vc-registered
but is a symlink to a vc-maintained file.
This commit is contained in:
parent
147a661590
commit
8d51c5cc39
1 changed files with 6 additions and 0 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue