aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2022-09-03 11:03:01 -0400
committerStefan Monnier2022-09-03 15:14:58 -0400
commitaad38d6010d9eef07685fa52ce93bcf70512f88b (patch)
tree321a2adea0eb71b3f1cd30c2829460d475704bc9
parentf9f92772dcdab739db54cf03dad9037f4b53473d (diff)
downloademacs-aad38d6010d9eef07685fa52ce93bcf70512f88b.tar.gz
emacs-aad38d6010d9eef07685fa52ce93bcf70512f88b.zip
* lisp/emacs-lisp/comp.el (comp-run-async-workers): Fail more gracefully
Otherwise Emacs may fail to start if it can't find a writable `~/.emacs.d/eln-cache` directory. Fixes bug#57562. See also Debian's bug #1017739.
-rw-r--r--lisp/emacs-lisp/comp.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 374b39e9990..a5ab12ae388 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -3927,8 +3927,11 @@ display a message."
3927 when (or native-comp-always-compile 3927 when (or native-comp-always-compile
3928 load ; Always compile when the compilation is 3928 load ; Always compile when the compilation is
3929 ; commanded for late load. 3929 ; commanded for late load.
3930 (file-newer-than-file-p 3930 ;; Skip compilation if `comp-el-to-eln-filename' fails
3931 source-file (comp-el-to-eln-filename source-file))) 3931 ;; to find a writable directory.
3932 (with-demoted-errors "Async compilation :%S"
3933 (file-newer-than-file-p
3934 source-file (comp-el-to-eln-filename source-file))))
3932 do (let* ((expr `((require 'comp) 3935 do (let* ((expr `((require 'comp)
3933 ,(when (boundp 'backtrace-line-length) 3936 ,(when (boundp 'backtrace-line-length)
3934 `(setf backtrace-line-length ,backtrace-line-length)) 3937 `(setf backtrace-line-length ,backtrace-line-length))