diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-10-17 10:48:12 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-10-17 10:48:20 +0200 |
commit | 5176d006114390885a3a34fd80a8e25687558edc (patch) | |
tree | e235d58f502bcd7298d71e0666c3f5ac8bad6aec /lisp/emacs-lisp | |
parent | 44541c78541a96f85f3316a527374c4e4d3c75fc (diff) | |
download | emacs-5176d006114390885a3a34fd80a8e25687558edc.tar.gz emacs-5176d006114390885a3a34fd80a8e25687558edc.tar.bz2 emacs-5176d006114390885a3a34fd80a8e25687558edc.zip |
Avoid having the async compile log saying it's compiling loaddefs
* lisp/loadup.el (featurep): Define the hash table in nativecomp
builds (but not otherwise). A more natural place to define this
would be in comp.el, but comp.el isn't loaded yet when we load the
.elc file that updates comp--no-native-compile. We could change
the load order and move the definition to comp.el, though.
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Allow
inhibiting nativecomp earlier (bug#57627).
* lisp/emacs-lisp/comp.el (native-compile-async-skip-p): Use the data.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 12 | ||||
-rw-r--r-- | lisp/emacs-lisp/comp.el | 1 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 3ceb5da804f..692a87f6d57 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2323,9 +2323,15 @@ With argument ARG, insert value in current buffer after the form." (setq case-fold-search nil)) (displaying-byte-compile-warnings (with-current-buffer inbuffer - (and byte-compile-current-file - (byte-compile-insert-header byte-compile-current-file - byte-compile--outbuffer)) + (when byte-compile-current-file + (byte-compile-insert-header byte-compile-current-file + byte-compile--outbuffer) + ;; Instruct native-comp to ignore this file. + (when (bound-and-true-p no-native-compile) + (with-current-buffer byte-compile--outbuffer + (insert + "(when (boundp 'comp--no-native-compile) + (puthash load-file-name t comp--no-native-compile))\n\n")))) (goto-char (point-min)) ;; Should we always do this? When calling multiple files, it ;; would be useful to delay this warning until all have been diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 889bffa3f5c..c300c44a8d7 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -4119,6 +4119,7 @@ the deferred compilation mechanism." LOAD and SELECTOR work as described in `native--compile-async'." ;; Make sure we are not already compiling `file' (bug#40838). (or (gethash file comp-async-compilations) + (gethash (file-name-with-extension file "elc") comp--no-native-compile) (cond ((null selector) nil) ((functionp selector) (not (funcall selector file))) |