summaryrefslogtreecommitdiff
path: root/lisp/vc.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-05-13 01:31:28 +0000
committerRichard M. Stallman <rms@gnu.org>1996-05-13 01:31:28 +0000
commite9702a53b1d7462a6678c60446fb7aae763d6ae0 (patch)
treec3cdf832d1677e3bfe11ff3a65e4772aa7071417 /lisp/vc.el
parentb18dde44cbd828ae14ff313d1faca5d06fd0c183 (diff)
downloademacs-e9702a53b1d7462a6678c60446fb7aae763d6ae0.tar.gz
(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 1f649bf6abf..190cdc254be 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