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:
parent
d56458467b
commit
6492b55df7
@ -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 ()
|
||||
|
Loading…
Reference in New Issue
Block a user