mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(write-file): Make buffer writable if the new file is.
This commit is contained in:
parent
d56458467b
commit
6492b55df7
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue