Only do the `C-x C-q' warning on VC backends where it makes sense.

Fixes: debbugs:2623
This commit is contained in:
Leo Liu 2011-07-11 15:56:49 +02:00 committed by Lars Magne Ingebrigtsen
parent eea84fe52e
commit 481a51b660
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2011-07-11 Leo <sdl.web@gmail.com> (tiny change)
* files.el (toggle-read-only): Only do the `C-x C-q' warning on VC
backends where it makes sense (bug#2623).
2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
* dired-x.el (dired-guess-default): Remove duplicate shell command

View file

@ -4694,7 +4694,7 @@ and `view-read-only' is non-nil, enter view mode."
(view-mode-enter))
(t (setq buffer-read-only (not buffer-read-only))
(force-mode-line-update)))
(if (vc-backend buffer-file-name)
(if (memq (vc-backend buffer-file-name) '(RCS SCCS))
(message "%s" (substitute-command-keys
(concat "File is under version-control; "
"use \\[vc-next-action] to check in/out"))))))