aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/vc.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index 1f649bf6ab..190cdc254b 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1727,7 +1727,10 @@ A prefix argument means do not revert the buffer afterwards."
(if oldbuf
(save-excursion
(set-buffer oldbuf)
- (set-visited-file-name new)
+ (let ((buffer-read-only buffer-read-only))
+ (set-visited-file-name new))
+ (vc-backend new)
+ (vc-mode-line new)
(set-buffer-modified-p nil))))
;; This had FILE, I changed it to OLD. -- rms.
(vc-backend-dispatch old