From 6492b55df79566111e583d1d296325625e06cbd1 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Thu, 20 Nov 1997 22:00:57 +0000 Subject: [PATCH] (write-file): Make buffer writable if the new file is. --- lisp/files.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/files.el b/lisp/files.el index fbb148322fd..b63b6c49b34 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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 () -- 2.39.2