unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37819: [PATCH] Make 'load-dangerous-libraries' obsolete
@ 2019-10-19  0:09 Stefan Kangas
  2019-10-19  6:30 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Kangas @ 2019-10-19  0:09 UTC (permalink / raw)
  To: 37819

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

I suspect that 'load-dangerous-libraries' is largely irrelevant
nowadays.  Is this correct?  If yes, here is a patch which would
ignore it and declare it obsolete.

Best regards,
Stefan Kangas

[-- Attachment #2: 0001-Make-load-dangerous-libraries-obsolete.patch --]
[-- Type: application/octet-stream, Size: 2883 bytes --]

From c938ebe75a598f8c2720d8d3bccadaa7d214ab80 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Sat, 19 Oct 2019 02:05:50 +0200
Subject: [PATCH] Make 'load-dangerous-libraries' obsolete

* lisp/subr.el (load-dangerous-libraries): Declare obsolete.
* src/lread.c (Fload): Ignore its value.
(syms_of_lread): Update doc string of 'bytecomp-version-regexp' to not
refer to it.
* doc/emacs/building.texi (Lisp Libraries): Remove its documentation.
---
 doc/emacs/building.texi | 7 -------
 lisp/subr.el            | 3 +++
 src/lread.c             | 7 ++-----
 3 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index f7809d4aa9..e28eab0292 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -1528,13 +1528,6 @@ Lisp Libraries
 prefix being completed.  To disable this feature, change the variable
 @code{help-enable-completion-autoload} to @code{nil}.
 
-@vindex load-dangerous-libraries
-@cindex Lisp files byte-compiled by XEmacs
-  By default, Emacs refuses to load compiled Lisp files which were
-compiled with XEmacs, a modified version of Emacs---they can cause
-Emacs to crash.  Set the variable @code{load-dangerous-libraries} to
-@code{t} if you want to try loading them.
-
 @node Lisp Eval
 @section Evaluating Emacs Lisp Expressions
 @cindex Emacs Lisp mode
diff --git a/lisp/subr.el b/lisp/subr.el
index 1a4a2e8b81..97227f97fd 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1623,6 +1623,9 @@ log10
 (defvaralias 'messages-buffer-max-lines 'message-log-max)
 (define-obsolete-variable-alias 'inhibit-null-byte-detection
   'inhibit-nul-byte-detection "27.1")
+(make-obsolete-variable 'load-dangerous-libraries
+                        "no longer used." "27.1")
+
 \f
 ;;;; Alternate names for functions - these are not being phased out.
 
diff --git a/src/lread.c b/src/lread.c
index 4ea6202972..cda46dbba2 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1329,10 +1329,7 @@ DEFUN ("load", Fload, Sload, 1, 5, 0,
 	      && ! (version = safe_to_load_version (fd)))
 	    {
 	      safe_p = 0;
-	      if (!load_dangerous_libraries)
-		error ("File `%s' was not compiled in Emacs", SDATA (found));
-	      else if (!NILP (nomessage) && !force_load_messages)
-		message_with_string ("File `%s' not compiled in Emacs", found, 1);
+	      error ("File `%s' was not compiled in Emacs", SDATA (found));
 	    }
 
 	  compiled = 1;
@@ -5014,7 +5011,7 @@ syms_of_lread (void)
 When Emacs loads a compiled Lisp file, it reads the first 512 bytes
 from the file, and matches them against this regular expression.
 When the regular expression matches, the file is considered to be safe
-to load.  See also `load-dangerous-libraries'.  */);
+to load.  */);
   Vbytecomp_version_regexp
     = build_pure_c_string ("^;;;.\\(in Emacs version\\|bytecomp version FSF\\)");
 
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-03-01  0:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-19  0:09 bug#37819: [PATCH] Make 'load-dangerous-libraries' obsolete Stefan Kangas
2019-10-19  6:30 ` Eli Zaretskii
2019-10-19  8:33   ` Lars Ingebrigtsen
2019-10-19 11:55     ` Stefan Kangas
     [not found]       ` <87o8v21twh.fsf@marxist.se>
2020-01-22 13:22         ` Lars Ingebrigtsen
2020-01-23 17:12           ` Stefan Kangas
2020-02-19 13:12             ` Lars Ingebrigtsen
2020-03-01  0:20               ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).