diff options
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 20a481a8a1c..507cfe76ffa 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -2041,7 +2041,8 @@ The value is non-nil if there were no errors, nil if errors." | |||
| 2041 | (with-current-buffer output-buffer | 2041 | (with-current-buffer output-buffer |
| 2042 | (goto-char (point-max)) | 2042 | (goto-char (point-max)) |
| 2043 | (insert "\n") ; aaah, unix. | 2043 | (insert "\n") ; aaah, unix. |
| 2044 | (if (file-writable-p target-file) | 2044 | (if (or (file-writable-p target-file) |
| 2045 | byte-native-compiling) | ||
| 2045 | ;; We must disable any code conversion here. | 2046 | ;; We must disable any code conversion here. |
| 2046 | (progn | 2047 | (progn |
| 2047 | (let* ((coding-system-for-write 'no-conversion) | 2048 | (let* ((coding-system-for-write 'no-conversion) |
| @@ -2050,7 +2051,8 @@ The value is non-nil if there were no errors, nil if errors." | |||
| 2050 | ;; parallel bootstrap), it does not risk getting a | 2051 | ;; parallel bootstrap), it does not risk getting a |
| 2051 | ;; half-finished file. (Bug#4196) | 2052 | ;; half-finished file. (Bug#4196) |
| 2052 | (tempfile | 2053 | (tempfile |
| 2053 | (make-temp-file (expand-file-name target-file))) | 2054 | (make-temp-file (when (file-writable-p target-file) |
| 2055 | (expand-file-name target-file)))) | ||
| 2054 | (default-modes (default-file-modes)) | 2056 | (default-modes (default-file-modes)) |
| 2055 | (temp-modes (logand default-modes #o600)) | 2057 | (temp-modes (logand default-modes #o600)) |
| 2056 | (desired-modes (logand default-modes #o666)) | 2058 | (desired-modes (logand default-modes #o666)) |