Commit 730df8db authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(basic-save-buffer-2): For a new precious file,

use the default modes in the return value.
parent a926c9ce
......@@ -3630,8 +3630,9 @@ Before and after saving the buffer, this function runs
(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)
(setq setmodes (or setmodes
(cons (or (file-modes buffer-file-name) umask)
;; We succeeded in writing the temp file,
;; so rename it.
(rename-file tempname buffer-file-name t))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment