emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master c7b7c9d40f: Reinstate the Qload file name handler


From: Lars Ingebrigtsen
Subject: master c7b7c9d40f: Reinstate the Qload file name handler
Date: Thu, 2 Jun 2022 05:53:12 -0400 (EDT)

branch: master
commit c7b7c9d40f9b8f73792cf434ee3b2fdfe62af3cc
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Reinstate the Qload file name handler
    
    * src/lread.c (Fload): Reinstate the Qload file name handler
    (bug#12598).  This makes loading non-ASCII elc.gz files work.
---
 src/lread.c              | 7 +++----
 test/lisp/files-tests.el | 3 +--
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/lread.c b/src/lread.c
index a1045184d9..158ac36042 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1244,10 +1244,9 @@ Return t if the file exists and loads successfully.  */)
   CHECK_STRING (file);
 
   /* If file name is magic, call the handler.  */
-  /* This shouldn't be necessary any more now that `openp' handles it right.
-    handler = Ffind_file_name_handler (file, Qload);
-    if (!NILP (handler))
-      return call5 (handler, Qload, file, noerror, nomessage, nosuffix); */
+  handler = Ffind_file_name_handler (file, Qload);
+  if (!NILP (handler))
+    return call5 (handler, Qload, file, noerror, nomessage, nosuffix);
 
   /* The presence of this call is the result of a historical accident:
      it used to be in every file-operation and when it got removed
diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el
index c7ce03cc9b..54ada08800 100644
--- a/test/lisp/files-tests.el
+++ b/test/lisp/files-tests.el
@@ -939,7 +939,7 @@ unquoted file names."
   (files-tests--with-temp-non-special (tmpfile nospecial)
     (should (load nospecial nil t)))
   (files-tests--with-temp-non-special-and-file-name-handler (tmpfile nospecial)
-    (should (load nospecial nil t))))
+    (should-error (load nospecial nil t))))
 
 (ert-deftest files-tests-file-name-non-special-make-auto-save-file-name ()
   (files-tests--with-temp-non-special (tmpfile nospecial)
@@ -1838,7 +1838,6 @@ Prompt users for any modified buffer with 
`buffer-offer-save' non-nil."
   (should (eq major-mode 'text-mode)))
 
 (ert-deftest files-load-elc-gz-file ()
-  :expected-result :failed
   (skip-unless (executable-find "gzip"))
   (ert-with-temp-directory dir
     (let* ((pref (expand-file-name "compile-utf8" dir))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]