unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: 37819@debbugs.gnu.org
Subject: bug#37819: [PATCH] Make 'load-dangerous-libraries' obsolete
Date: Sat, 19 Oct 2019 02:09:59 +0200	[thread overview]
Message-ID: <CADwFkmkx4g-YW4VH2FmL8vD2eAwiotp9QO1XCMbYys+uSww4vg@mail.gmail.com> (raw)

[-- 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


             reply	other threads:[~2019-10-19  0:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-19  0:09 Stefan Kangas [this message]
2019-10-19  6:30 ` bug#37819: [PATCH] Make 'load-dangerous-libraries' obsolete 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmkx4g-YW4VH2FmL8vD2eAwiotp9QO1XCMbYys+uSww4vg@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=37819@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).