aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lread.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lread.c b/src/lread.c
index 9f804ac3194..5c47f78f8e4 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1204,7 +1204,11 @@ Return t if the file exists and loads successfully. */)
1204 specbind (Qold_style_backquotes, Qnil); 1204 specbind (Qold_style_backquotes, Qnil);
1205 record_unwind_protect (load_warn_old_style_backquotes, file); 1205 record_unwind_protect (load_warn_old_style_backquotes, file);
1206 1206
1207 if (suffix_p (found, ".elc") || (fd >= 0 && (version = safe_to_load_version (fd)) > 0)) 1207 int is_elc;
1208 if ((is_elc = suffix_p (found, ".elc")) != 0
1209 /* version = 1 means the file is empty, in which case we can
1210 treat it as not byte-compiled. */
1211 || (fd >= 0 && (version = safe_to_load_version (fd)) > 1))
1208 /* Load .elc files directly, but not when they are 1212 /* Load .elc files directly, but not when they are
1209 remote and have no handler! */ 1213 remote and have no handler! */
1210 { 1214 {
@@ -1231,7 +1235,7 @@ Return t if the file exists and loads successfully. */)
1231 /* openp already checked for newness, no point doing it again. 1235 /* openp already checked for newness, no point doing it again.
1232 FIXME would be nice to get a message when openp 1236 FIXME would be nice to get a message when openp
1233 ignores suffix order due to load_prefer_newer. */ 1237 ignores suffix order due to load_prefer_newer. */
1234 if (!load_prefer_newer) 1238 if (!load_prefer_newer && is_elc)
1235 { 1239 {
1236 result = stat (SSDATA (efound), &s1); 1240 result = stat (SSDATA (efound), &s1);
1237 if (result == 0) 1241 if (result == 0)