aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/vc.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1996-05-13 01:31:28 +0000
committerRichard M. Stallman <[email protected]>1996-05-13 01:31:28 +0000
commit4c145b9e93cbf404255aaf9bfda395e8bbeb175e (patch)
treeaf9608bcaba75a5e9811cf947eb11f7a82c33e83 /lisp/vc.el
parent5066676655ae1db49d3ed90df1fb0628afaed5c9 (diff)
(vc-rename-file): After renaming, update VC info and modeline.
Preserve buffer-read-only.
Diffstat (limited to 'lisp/vc.el')
-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