diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-10-17 14:30:54 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-10-17 14:30:54 +0200 |
commit | b9aff5fdb89092b68ebd7782c8dc85e6daca14b2 (patch) | |
tree | 58c1ad9265b2420867052beb2bf2fafb671f8414 /lisp/emacs-lisp | |
parent | 5176d006114390885a3a34fd80a8e25687558edc (diff) | |
download | emacs-b9aff5fdb89092b68ebd7782c8dc85e6daca14b2.tar.gz emacs-b9aff5fdb89092b68ebd7782c8dc85e6daca14b2.tar.bz2 emacs-b9aff5fdb89092b68ebd7782c8dc85e6daca14b2.zip |
Fix spurious "Compilation finished" native-comp messages
* lisp/emacs-lisp/comp.el (native--compile-async): Don't start the
async compilation if we didn't add anything. This avoids spurious
"Compilation finished" messages in the *Async* buffer when it
turned out that all the files we considered nativecomping were
skipped.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index c300c44a8d7..686c7aeb3db 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -4167,7 +4167,8 @@ bytecode definition was not changed in the meantime)." (error "LOAD must be nil, t or 'late")) (unless (listp files) (setf files (list files))) - (let (file-list) + (let ((added-something nil) + file-list) (dolist (file-or-dir files) (cond ((file-directory-p file-or-dir) (dolist (file (if recursively @@ -4195,11 +4196,15 @@ bytecode definition was not changed in the meantime)." (make-directory out-dir t)) (if (file-writable-p out-filename) (setf comp-files-queue - (append comp-files-queue `((,file . ,load)))) + (append comp-files-queue `((,file . ,load))) + added-something t) (display-warning 'comp (format "No write access for %s skipping." out-filename))))))) - (when (zerop (comp-async-runnings)) + ;; Perhaps nothing passed `native-compile-async-skip-p'? + (when (and added-something + ;; Don't start if there's one already running. + (zerop (comp-async-runnings))) (comp-run-async-workers)))) |