summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-01-19 14:37:31 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2018-01-19 14:40:56 -0800
commit4fd446e9f65e5531b18d4a0c5e08a6eeabc292d8 (patch)
treee9b6a1209ef114e899c637f07fba954fc35395e4 /lisp/emacs-lisp
parent7f48a11216fc12f1aef8158f82e5a0a0706f51af (diff)
downloademacs-4fd446e9f65e5531b18d4a0c5e08a6eeabc292d8.tar.gz
emacs-4fd446e9f65e5531b18d4a0c5e08a6eeabc292d8.tar.bz2
emacs-4fd446e9f65e5531b18d4a0c5e08a6eeabc292d8.zip
Fix tempfile creation when byte compiling
This improves on the recent fix for master failing to build on FreeBSD. Suggested by Stefan Monnier in: https://lists.gnu.org/r/emacs-devel/2018-01/msg00600.html * lisp/emacs-lisp/bytecomp.el (byte-compile-file): Put tempfile next to the target file, as was the original intent.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el12
1 files changed, 1 insertions, 11 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 700a7c16b58..f6d259ba9da 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1933,17 +1933,7 @@ The value is non-nil if there were no errors, nil if errors."
;; parallel bootstrap), it does not risk getting a
;; half-finished file. (Bug#4196)
(tempfile
- (if (file-name-absolute-p target-file)
- (make-temp-file target-file)
- ;; If target-file is relative and includes
- ;; leading directories, make-temp-file will
- ;; assume those leading directories exist
- ;; under temporary-file-directory, which might
- ;; not be true. So strip leading directories
- ;; from relative file names before calling
- ;; make-temp-file.
- (make-temp-file
- (file-name-nondirectory target-file))))
+ (make-temp-file (expand-file-name target-file)))
(default-modes (default-file-modes))
(temp-modes (logand default-modes #o600))
(desired-modes (logand default-modes #o666))