diff options
| author | Richard M. Stallman | 2006-06-16 15:14:40 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2006-06-16 15:14:40 +0000 |
| commit | 730df8dbd56435eaf68d4ba29504a31e746c6ce3 (patch) | |
| tree | 444bbd521a0d99b962d77b84e9bfe9c61788eea2 | |
| parent | a926c9ceedba01b3e90905f25b98ef16895a701b (diff) | |
| download | emacs-730df8dbd56435eaf68d4ba29504a31e746c6ce3.tar.gz emacs-730df8dbd56435eaf68d4ba29504a31e746c6ce3.zip | |
(basic-save-buffer-2): For a new precious file,
use the default modes in the return value.
| -rw-r--r-- | lisp/files.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el index 91f857dd2ec..3313f003d89 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -3630,8 +3630,9 @@ Before and after saving the buffer, this function runs | |||
| 3630 | (set-visited-file-modtime old-modtime))) | 3630 | (set-visited-file-modtime old-modtime))) |
| 3631 | ;; Since we have created an entirely new file, | 3631 | ;; Since we have created an entirely new file, |
| 3632 | ;; make sure it gets the right permission bits set. | 3632 | ;; make sure it gets the right permission bits set. |
| 3633 | (setq setmodes (or setmodes (cons (file-modes buffer-file-name) | 3633 | (setq setmodes (or setmodes |
| 3634 | buffer-file-name))) | 3634 | (cons (or (file-modes buffer-file-name) umask) |
| 3635 | buffer-file-name))) | ||
| 3635 | ;; We succeeded in writing the temp file, | 3636 | ;; We succeeded in writing the temp file, |
| 3636 | ;; so rename it. | 3637 | ;; so rename it. |
| 3637 | (rename-file tempname buffer-file-name t)) | 3638 | (rename-file tempname buffer-file-name t)) |