aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/emacs/building.texi7
-rw-r--r--etc/NEWS5
-rw-r--r--lisp/subr.el3
-rw-r--r--src/lread.c23
4 files changed, 13 insertions, 25 deletions
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 02f18865f39..272b08d08e9 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -1528,13 +1528,6 @@ Automatic loading also occurs when completing names for
1528prefix being completed. To disable this feature, change the variable 1528prefix being completed. To disable this feature, change the variable
1529@code{help-enable-completion-autoload} to @code{nil}. 1529@code{help-enable-completion-autoload} to @code{nil}.
1530 1530
1531@vindex load-dangerous-libraries
1532@cindex Lisp files byte-compiled by XEmacs
1533 By default, Emacs refuses to load compiled Lisp files which were
1534compiled with XEmacs, a modified version of Emacs---they can cause
1535Emacs to crash. Set the variable @code{load-dangerous-libraries} to
1536@code{t} if you want to try loading them.
1537
1538@node Lisp Eval 1531@node Lisp Eval
1539@section Evaluating Emacs Lisp Expressions 1532@section Evaluating Emacs Lisp Expressions
1540@cindex Emacs Lisp mode 1533@cindex Emacs Lisp mode
diff --git a/etc/NEWS b/etc/NEWS
index ee3a3c19e7c..7f70d149d6c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -202,6 +202,11 @@ Emacs now supports bignums so this old glitch is no longer needed.
202'previous-system-time-locale' have been removed, as they were created 202'previous-system-time-locale' have been removed, as they were created
203by mistake and were not useful to Lisp code. 203by mistake and were not useful to Lisp code.
204 204
205** The 'load-dangerous-libraries' variable is now obsolete.
206It was used to allow loading Lisp libraries compiled by XEmacs, a
207modified version of Emacs which is no longer actively maintained.
208This is no longer supported, and setting this variable has no effect.
209
205 210
206* Lisp Changes in Emacs 28.1 211* Lisp Changes in Emacs 28.1
207 212
diff --git a/lisp/subr.el b/lisp/subr.el
index b5ec0de156a..96b98c6a5b3 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1621,6 +1621,9 @@ be a list of the form returned by `event-start' and `event-end'."
1621(defvaralias 'messages-buffer-max-lines 'message-log-max) 1621(defvaralias 'messages-buffer-max-lines 'message-log-max)
1622(define-obsolete-variable-alias 'inhibit-null-byte-detection 1622(define-obsolete-variable-alias 'inhibit-null-byte-detection
1623 'inhibit-nul-byte-detection "27.1") 1623 'inhibit-nul-byte-detection "27.1")
1624(make-obsolete-variable 'load-dangerous-libraries
1625 "no longer used." "27.1")
1626
1624 1627
1625;;;; Alternate names for functions - these are not being phased out. 1628;;;; Alternate names for functions - these are not being phased out.
1626 1629
diff --git a/src/lread.c b/src/lread.c
index 70984d37e18..eabf3b938c2 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -979,9 +979,7 @@ lisp_file_lexically_bound_p (Lisp_Object readcharfun)
979 979
980/* Value is a version number of byte compiled code if the file 980/* Value is a version number of byte compiled code if the file
981 associated with file descriptor FD is a compiled Lisp file that's 981 associated with file descriptor FD is a compiled Lisp file that's
982 safe to load. Only files compiled with Emacs are safe to load. 982 safe to load. Only files compiled with Emacs can be loaded. */
983 Files compiled with XEmacs can lead to a crash in Fbyte_code
984 because of an incompatible change in the byte compiler. */
985 983
986static int 984static int
987safe_to_load_version (int fd) 985safe_to_load_version (int fd)
@@ -1135,7 +1133,6 @@ Return t if the file exists and loads successfully. */)
1135 /* True means we are loading a compiled file. */ 1133 /* True means we are loading a compiled file. */
1136 bool compiled = 0; 1134 bool compiled = 0;
1137 Lisp_Object handler; 1135 Lisp_Object handler;
1138 bool safe_p = 1;
1139 const char *fmode = "r" FOPEN_TEXT; 1136 const char *fmode = "r" FOPEN_TEXT;
1140 int version; 1137 int version;
1141 1138
@@ -1318,11 +1315,7 @@ Return t if the file exists and loads successfully. */)
1318 if (version < 0 1315 if (version < 0
1319 && ! (version = safe_to_load_version (fd))) 1316 && ! (version = safe_to_load_version (fd)))
1320 { 1317 {
1321 safe_p = 0; 1318 error ("File `%s' was not compiled in Emacs", SDATA (found));
1322 if (!load_dangerous_libraries)
1323 error ("File `%s' was not compiled in Emacs", SDATA (found));
1324 else if (!NILP (nomessage) && !force_load_messages)
1325 message_with_string ("File `%s' not compiled in Emacs", found, 1);
1326 } 1319 }
1327 1320
1328 compiled = 1; 1321 compiled = 1;
@@ -1429,10 +1422,7 @@ Return t if the file exists and loads successfully. */)
1429 1422
1430 if (NILP (nomessage) || force_load_messages) 1423 if (NILP (nomessage) || force_load_messages)
1431 { 1424 {
1432 if (!safe_p) 1425 if (is_module)
1433 message_with_string ("Loading %s (compiled; note unsafe, not compiled in Emacs)...",
1434 file, 1);
1435 else if (is_module)
1436 message_with_string ("Loading %s (module)...", file, 1); 1426 message_with_string ("Loading %s (module)...", file, 1);
1437 else if (!compiled) 1427 else if (!compiled)
1438 message_with_string ("Loading %s (source)...", file, 1); 1428 message_with_string ("Loading %s (source)...", file, 1);
@@ -1492,10 +1482,7 @@ Return t if the file exists and loads successfully. */)
1492 1482
1493 if (!noninteractive && (NILP (nomessage) || force_load_messages)) 1483 if (!noninteractive && (NILP (nomessage) || force_load_messages))
1494 { 1484 {
1495 if (!safe_p) 1485 if (is_module)
1496 message_with_string ("Loading %s (compiled; note unsafe, not compiled in Emacs)...done",
1497 file, 1);
1498 else if (is_module)
1499 message_with_string ("Loading %s (module)...done", file, 1); 1486 message_with_string ("Loading %s (module)...done", file, 1);
1500 else if (!compiled) 1487 else if (!compiled)
1501 message_with_string ("Loading %s (source)...done", file, 1); 1488 message_with_string ("Loading %s (source)...done", file, 1);
@@ -4975,7 +4962,7 @@ This overrides the value of the NOMESSAGE argument to `load'. */);
4975When Emacs loads a compiled Lisp file, it reads the first 512 bytes 4962When Emacs loads a compiled Lisp file, it reads the first 512 bytes
4976from the file, and matches them against this regular expression. 4963from the file, and matches them against this regular expression.
4977When the regular expression matches, the file is considered to be safe 4964When the regular expression matches, the file is considered to be safe
4978to load. See also `load-dangerous-libraries'. */); 4965to load. */);
4979 Vbytecomp_version_regexp 4966 Vbytecomp_version_regexp
4980 = build_pure_c_string ("^;;;.\\(in Emacs version\\|bytecomp version FSF\\)"); 4967 = build_pure_c_string ("^;;;.\\(in Emacs version\\|bytecomp version FSF\\)");
4981 4968