Mercurial > emacs
diff lisp/files.el @ 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 | 84d1bec9ac4b |
children | fea279940ce8 |
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 ()