From 481a51b660b2a4f78b2ba852d8eb4e49f553bba8 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Mon, 11 Jul 2011 15:56:49 +0200 Subject: [PATCH] Only do the `C-x C-q' warning on VC backends where it makes sense. Fixes: debbugs:2623 --- lisp/ChangeLog | 5 +++++ lisp/files.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 (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 * 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")))))) -- 2.39.5