Commit 6492b55d authored by Karl Heuer's avatar Karl Heuer
Browse files

(write-file): Make buffer writable if the new file is.

parent d5645846
......@@ -1786,6 +1786,10 @@ Interactively, confirmation is required unless you supply a prefix argument."
(error "Canceled")))
(set-visited-file-name filename (not confirm))))
(set-buffer-modified-p t)
;; Make buffer writable if file is writable.
(and buffer-file-name
(file-writable-p buffer-file-name)
(setq buffer-read-only nil))
(save-buffer))
(defun backup-buffer ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment