:type 'boolean
:version "28.1")
+(defcustom comp-warning-on-missing-source t
+ "Emit a warning if a byte-code file being loaded has no corresponding source.
+The source file is necessary for native code file look-up and deferred
+compilation mechanism."
+ :type 'boolean
+ :version "28.1")
+
(defvar no-native-compile nil
"Non-nil to prevent native-compiling of Emacs Lisp code.
Note that when `no-byte-compile' is set to non-nil it overrides the value of
DEFSYM (Qlate, "late");
DEFSYM (Qlambda_fixup, "lambda-fixup");
DEFSYM (Qgccjit, "gccjit");
- DEFSYM (Qcomp_subr_trampoline_install, "comp-subr-trampoline-install")
+ DEFSYM (Qcomp_subr_trampoline_install, "comp-subr-trampoline-install");
+ DEFSYM (Qcomp_warning_on_missing_source, "comp-warning-on-missing-source");
/* To be signaled by the compiler. */
DEFSYM (Qnative_compiler_error, "native-compiler-error");
{
src_name = concat2 (src_name, build_string (".gz"));
if (NILP (Ffile_exists_p (src_name)))
- /* Can't find the corresponding source file. */
- return;
+ {
+ if (!NILP (find_symbol_value (Qcomp_warning_on_missing_source)))
+ call2 (intern_c_string ("display-warning"),
+ Qcomp,
+ CALLN (Fformat,
+ build_string ("Cannot look-up eln file as no source "
+ "file was found for %s"),
+ *filename));
+ return;
+ }
}
Lisp_Object eln_rel_name = Fcomp_el_to_eln_rel_filename (src_name);