From: Karl Heuer Date: Thu, 20 Nov 1997 22:00:57 +0000 (+0000) Subject: (write-file): Make buffer writable if the new file is. X-Git-Tag: emacs-20.3~2782 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6492b55df79566111e583d1d296325625e06cbd1;p=emacs.git (write-file): Make buffer writable if the new file is. --- 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 ()