# HG changeset patch # User Jim Blandy # Date 731833484 0 # Node ID baec460e28c7bc8df003c57f0998b7e1e3ee5810 # Parent 1c718ee07ac906011d3648dcb56e1a080918a35f * files.el (basic-save-buffer): If file-precious-flag is set, and we write the buffer to a temp file and then rename it, don't neglect to set the new file's modes properly. diff -r 1c718ee07ac9 -r baec460e28c7 lisp/files.el --- a/lisp/files.el Thu Mar 11 07:03:57 1993 +0000 +++ b/lisp/files.el Thu Mar 11 07:04:44 1993 +0000 @@ -1279,6 +1279,10 @@ ;; If writing the temp file fails, ;; delete the temp file. (or succeed (delete-file tempname))) + ;; Since we have created an entirely new file + ;; and renamed it, make sure it gets the + ;; right permission bits set. + (setq setmodes (file-modes buffer-file-name)) ;; We succeeded in writing the temp file, ;; so rename it. (rename-file tempname buffer-file-name t))