summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Liu <sdl.web@gmail.com>2011-07-11 15:56:49 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2011-07-11 15:56:49 +0200
commit481a51b660b2a4f78b2ba852d8eb4e49f553bba8 (patch)
tree6eb384300594572bb46651a2cebe5de3e91613fa
parenteea84fe52e76f84b02df004e31c638a3fb2ab6e6 (diff)
downloademacs-481a51b660b2a4f78b2ba852d8eb4e49f553bba8.tar.gz
Only do the `C-x C-q' warning on VC backends where it makes sense.
Fixes: debbugs:2623
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/files.el2
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a767eab06f4..26a5131feaa 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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
diff --git a/lisp/files.el b/lisp/files.el
index c9f85ff6a1a..1071adb6967 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -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"))))))