# HG changeset patch # User Richard M. Stallman # Date 1150470880 0 # Node ID a8804de7b167e7f5d6ce7d17ca7ddf2f43fd2692 # Parent 71f07d141fe28a15f152916b9e6d8dc2887ffc36 (basic-save-buffer-2): For a new precious file, use the default modes in the return value. diff -r 71f07d141fe2 -r a8804de7b167 lisp/files.el --- a/lisp/files.el Fri Jun 16 15:13:21 2006 +0000 +++ b/lisp/files.el Fri Jun 16 15:14:40 2006 +0000 @@ -3630,8 +3630,9 @@ (set-visited-file-modtime old-modtime))) ;; Since we have created an entirely new file, ;; make sure it gets the right permission bits set. - (setq setmodes (or setmodes (cons (file-modes buffer-file-name) - buffer-file-name))) + (setq setmodes (or setmodes + (cons (or (file-modes buffer-file-name) umask) + buffer-file-name))) ;; We succeeded in writing the temp file, ;; so rename it. (rename-file tempname buffer-file-name t))