diff src/lread.c @ 31367:22eb2b661cdf

(syms_of_lread): Make Vbytecomp_version_regexp a Lisp variable; recognize Emacs 19 elc files.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 04 Sep 2000 12:03:00 +0000
parents 08bb5394dee1
children 2efc0e152012
line wrap: on
line diff
--- a/src/lread.c	Mon Sep 04 11:57:57 2000 +0000
+++ b/src/lread.c	Mon Sep 04 12:03:00 2000 +0000
@@ -3543,8 +3543,14 @@
 them.");
   load_dangerous_libraries = 0;
 
-  Vbytecomp_version_regexp = build_string ("^;;;.in Emacs version");
-  staticpro (&Vbytecomp_version_regexp);
+  DEFVAR_LISP ("bytecomp-version-regexp", &Vbytecomp_version_regexp,
+     "Regular expression matching safe to load compiled Lisp files.\n\
+When Emacs loads a compiled Lisp file, it reads the first 512 bytes\n\
+from the file, and matches them against this regular expression.\n\
+When the regular expression matches, the file is considered to be safe\n\
+to load.  See also `load-dangerous-libraries'.");
+  Vbytecomp_version_regexp
+    = build_string ("^;;;.\\(in Emacs\\|emacs\\) version");
 
   /* Vsource_directory was initialized in init_lread.  */