Mercurial > emacs
changeset 20291:96eee1e730a1
(write-file): Make buffer writable if the new file is.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 20 Nov 1997 22:00:57 +0000 |
parents | 456ed25a8605 |
children | 2befa7396e42 |
files | lisp/files.el |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Thu Nov 20 21:59:02 1997 +0000 +++ b/lisp/files.el Thu Nov 20 22:00:57 1997 +0000 @@ -1786,6 +1786,10 @@ (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 ()