summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-03-27 19:49:47 +0000
committerRichard M. Stallman <rms@gnu.org>1994-03-27 19:49:47 +0000
commitee81c9594f713db7f6f63c3936274143009581fe (patch)
tree064e27b8a416eb7ed969f624260a1ba23d1abd6f /lisp/files.el
parentb5bcaf3ebb7e491b63f32a41d02f4b2fc3e55cac (diff)
downloademacs-ee81c9594f713db7f6f63c3936274143009581fe.tar.gz
(set-visited-file-name): Kill local var vc-mode.
Make buffer writable if was read-only due to vc.
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/files.el b/lisp/files.el
index c4eb7f93207..e3d3bbe2dfb 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1184,6 +1184,11 @@ if you wish to pass an empty string as the argument."
(kill-local-variable 'local-write-file-hooks)
(kill-local-variable 'revert-buffer-function)
(kill-local-variable 'backup-inhibited)
+ ;; If buffer was read-only because of version control,
+ ;; that reason is gone now, so make it writable.
+ (if vc-mode
+ (setq buffer-read-only nil))
+ (kill-local-variable 'vc-mode)
;; Turn off backup files for certain file names.
;; Since this is a permanent local, the major mode won't eliminate it.
(and (not (funcall backup-enable-predicate buffer-file-name))