1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-03 11:33:37 +00:00

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

This commit is contained in:
Karl Heuer 1997-11-20 22:00:57 +00:00
parent d56458467b
commit 6492b55df7

View File

@ -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 ()