]> git.eshelyaron.com Git - emacs.git/commitdiff
* comp.el (comp-run-async-workers): Load only if compilation succeed
authorAndrea Corallo <akrl@sdf.org>
Wed, 18 Mar 2020 20:16:05 +0000 (20:16 +0000)
committerAndrea Corallo <akrl@sdf.org>
Thu, 19 Mar 2020 16:49:23 +0000 (16:49 +0000)
lisp/emacs-lisp/comp.el

index 44de2745c6cdf290ac8f2ddd3f2b11f0f9aa5988..00883a356809b8153ae6620a1eccc57af40ce269 100644 (file)
@@ -2163,16 +2163,18 @@ display a message."
                                        (expand-file-name invocation-name
                                                          invocation-directory)
                                        "--batch" "--eval" (prin1-to-string expr))
-                             :sentinel (lambda (process _event)
-                                         (run-hook-with-args
-                                          'comp-async-cu-done-hook
-                                          source-file)
-                                         (accept-process-output process)
-                                         (when load1
-                                           (native-elisp-load
-                                            (comp-output-filename source-file1)
-                                            load1))
-                                         (comp-run-async-workers)))))
+                             :sentinel
+                             (lambda (process _event)
+                               (run-hook-with-args
+                                'comp-async-cu-done-hook
+                                source-file)
+                               (accept-process-output process)
+                               (when (and load1
+                                          (zerop (process-exit-status process)))
+                                 (native-elisp-load
+                                  (comp-output-filename source-file1)
+                                  load1))
+                               (comp-run-async-workers)))))
               (push process comp-async-processes))
          when (>= (comp-async-runnings) (comp-effective-async-max-jobs))
            do (cl-return)))