(let ((file (locate-library (concat term-file-prefix type))))
(and file
(or (assoc file load-history)
- (load file t t)))))
+ (load (file-name-sans-extension file)
+ t t)))))
type)
;; Next, try to find a matching initialization function, and call it.
(tty-find-type #'(lambda (type)
|| !NILP (Vpurify_flag)
|| !COMPILEDP (definition)
|| !STRINGP (Vload_true_file_name)
- || !suffix_p (Vload_true_file_name, ".elc"))
+ || !suffix_p (Vload_true_file_name, ".elc")
+ || !NILP (Fgethash (Vload_true_file_name, V_comp_no_native_file_h, Qnil)))
return;
Lisp_Object src =
protect the trampolines against GC. */);
Vcomp_installed_trampolines_h = CALLN (Fmake_hash_table);
+ DEFVAR_LISP ("comp-no-native-file-h", V_comp_no_native_file_h,
+ doc: /* Files for which no deferred compilation has to
+be performed because the bytecode version was explicitly requested by
+the user during load.
+For internal use. */);
+ V_comp_no_native_file_h = CALLN (Fmake_hash_table, QCtest, Qequal);
+
Fprovide (intern_c_string ("nativecomp"), Qnil);
#endif /* #ifdef HAVE_NATIVE_COMP */
#ifdef HAVE_NATIVE_COMP
struct stat eln_st;
+ if (no_native
+ || load_no_native)
+ Fputhash (*filename, Qt, V_comp_no_native_file_h);
+ else
+ Fremhash (*filename, V_comp_no_native_file_h);
+
if (no_native
|| load_no_native
|| !suffix_p (*filename, ".elc"))