Function: native-compile-async-skip-p

native-compile-async-skip-p is a byte-compiled function defined in comp.el.gz.

Signature

(native-compile-async-skip-p FILE LOAD SELECTOR)

Documentation

Return non-nil if FILE's compilation should be skipped.

LOAD and SELECTOR work as described in native--compile-async.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/comp.el.gz
(defun native-compile-async-skip-p (file load selector)
  "Return non-nil if FILE's compilation should be skipped.

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)))
       ((stringp selector) (not (string-match-p selector file)))
       (t (error "SELECTOR must be a function a regexp or nil")))
      ;; Also exclude files from deferred compilation if
      ;; any of the regexps in
      ;; `native-comp-jit-compilation-deny-list' matches.
      (and (eq load 'late)
           (cl-some (lambda (re)
                      (string-match-p re file))
                    native-comp-jit-compilation-deny-list))))