From: Andrea Corallo Date: Sat, 25 Apr 2020 13:45:21 +0000 (+0100) Subject: Fix deferred-compilation for double compilation (bug#40838). X-Git-Tag: emacs-28.0.90~2727^2~687 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bab36619fb26059e3ac7c794738be4314c681e08;p=emacs.git Fix deferred-compilation for double compilation (bug#40838). * lisp/emacs-lisp/comp.el (native-compile-async): Prevent double compilation (bug#40838). --- 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."))))