summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-04-14 08:48:24 +0100
committerAndrea Corallo <akrl@sdf.org>2020-04-14 08:48:24 +0100
commit8decfbe4d75b538707fa794c395d712bfde407f4 (patch)
treeb97b22c40705e30b08df269136b1d28dbce3e823 /lisp/emacs-lisp
parentb7678cf10e13727dab300c7162649cafc488e27e (diff)
downloademacs-8decfbe4d75b538707fa794c395d712bfde407f4.tar.gz
emacs-8decfbe4d75b538707fa794c395d712bfde407f4.tar.bz2
emacs-8decfbe4d75b538707fa794c395d712bfde407f4.zip
* lisp/emacs-lisp/comp.el (native-compile-async): Better error message.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/comp.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index fda8f7dc780..788ffb5b776 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -2311,13 +2311,14 @@ LOAD can be nil t or 'late."
(list "Path not a file nor directory" path)))))
(dolist (file files)
(if-let ((entry (cl-find file comp-files-queue :key #'car :test #'string=)))
- (when load
- ;; When no load is specified (plain async compilation) we
- ;; consider valid the one previously queued, otherwise we
- ;; check for coherence (bug#40602).
- (cl-assert (eq load (cdr entry))
- nil "Incoherent load kind in compilation queue for %s"
- file))
+ ;; When no load is specified (plain async compilation) we
+ ;; consider valid the one previously queued, otherwise we
+ ;; check for coherence (bug#40602).
+ (cl-assert (or (null load)
+ (eq load (cdr entry)))
+ nil "Trying to queue %s with LOAD %s but this is already \
+queued with LOAD %"
+ file load (cdr entry))
(setf comp-files-queue (append comp-files-queue `((,file . ,load))))))
(when (zerop (comp-async-runnings))
(comp-run-async-workers)