mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-05 11:45:45 +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")))
|
(error "Canceled")))
|
||||||
(set-visited-file-name filename (not confirm))))
|
(set-visited-file-name filename (not confirm))))
|
||||||
(set-buffer-modified-p t)
|
(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))
|
(save-buffer))
|
||||||
|
|
||||||
(defun backup-buffer ()
|
(defun backup-buffer ()
|
||||||
|
Loading…
Reference in New Issue
Block a user