From dc393517ca1cfef7770bffdfe2b7fd3c2c5e7bbf Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Thu, 1 Apr 2021 14:27:12 +0200 Subject: Issue a warning when eln look-up fails due to missing .el source file. * lisp/emacs-lisp/comp.el (comp-warning-on-missing-source): New customize. * src/lread.c (maybe_swap_for_eln): Issue a warning when eln look-up fails due to missing .el source file. * src/comp.c (syms_of_comp): Define 'Qcomp_warning_on_missing_source'. --- lisp/emacs-lisp/comp.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lisp/emacs-lisp/comp.el') diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 213eb7b4126..7f41a97f6b9 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -180,6 +180,13 @@ the .eln output directory." :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 -- cgit v1.2.3