aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Corallo2020-08-16 20:40:44 +0200
committerAndrea Corallo2020-08-16 20:40:44 +0200
commitaa644a7e9e085ad9838fcdfc01950fdb55a952e7 (patch)
tree0774bd9e0d9f416bf33e0b3da8fc36ad9dc184c7
parent7dd45e5b87da42fa9b868822979904fc214fad50 (diff)
downloademacs-aa644a7e9e085ad9838fcdfc01950fdb55a952e7.tar.gz
emacs-aa644a7e9e085ad9838fcdfc01950fdb55a952e7.zip
* Introduce `load-no-native'
Given load loads automatically a .eln in place of a .elc we need a way to force the .elc load in the case we really want it. * src/lread.c (syms_of_lread): Define `load-no-native'. (maybe_swap_for_eln): Make use of.
-rw-r--r--src/lread.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lread.c b/src/lread.c
index 3baf9dc7cd1..c602f3eecd1 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1615,7 +1615,8 @@ maybe_swap_for_eln (Lisp_Object *filename, int *fd, struct timespec mtime)
1615#ifdef HAVE_NATIVE_COMP 1615#ifdef HAVE_NATIVE_COMP
1616 struct stat eln_st; 1616 struct stat eln_st;
1617 1617
1618 if (!suffix_p (*filename, ".elc")) 1618 if (load_no_native
1619 || !suffix_p (*filename, ".elc"))
1619 return; 1620 return;
1620 1621
1621 /* Search eln in the eln-cache directories. */ 1622 /* Search eln in the eln-cache directories. */
@@ -5156,6 +5157,11 @@ Note that if you customize this, obviously it will not affect files
5156that are loaded before your customizations are read! */); 5157that are loaded before your customizations are read! */);
5157 load_prefer_newer = 0; 5158 load_prefer_newer = 0;
5158 5159
5160 DEFVAR_BOOL ("load-no-native", load_no_native,
5161 doc: /* Do not try to load the a .eln file in place of
5162 a .elc one. */);
5163 load_no_native = false;
5164
5159 /* Vsource_directory was initialized in init_lread. */ 5165 /* Vsource_directory was initialized in init_lread. */
5160 5166
5161 DEFSYM (Qcurrent_load_list, "current-load-list"); 5167 DEFSYM (Qcurrent_load_list, "current-load-list");