summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/comp.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 1369dd115dd..42c40aaa43a 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -2327,7 +2327,9 @@ LOAD can be nil t or 'late."
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))))))
+ ;; Make sure we are not already compiling `file' (bug#40838).
+ (unless (gethash file comp-async-compilations)
+ (setf comp-files-queue (append comp-files-queue `((,file . ,load)))))))
(when (zerop (comp-async-runnings))
(comp-run-async-workers)
(message "Compilation started."))))