]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't override load-path in require-theme
authorBasil L. Contovounesios <contovob@tcd.ie>
Fri, 5 Mar 2021 11:02:20 +0000 (11:02 +0000)
committerBasil L. Contovounesios <contovob@tcd.ie>
Fri, 5 Mar 2021 11:02:20 +0000 (11:02 +0000)
* lisp/custom.el (require-theme): Open-code 'require' error, because
binding load-path can prevent other libraries from loading on error,
such as debug.el, which gives a misleading error.  (Bug#45068)

lisp/custom.el

index b9fccce583340975dfb0ac72965a2a8397d206ad..85e5d65ffb2e206cf84114c429f0a903ef70fe4f 100644 (file)
@@ -1223,8 +1223,8 @@ provide FEATURE, signal an error.  This cannot be suppressed."
            (file (locate-file (symbol-name feature) path '(".elc" ".el"))))
       (and file (require feature (file-name-sans-extension file) noerror))))
    ((not noerror)
-    (let (load-path)
-      (require feature)))))
+    (signal 'file-missing `("Cannot open load file" "No such file or directory"
+                            ,(symbol-name feature))))))
 
 (defcustom custom-safe-themes '(default)
   "Themes that are considered safe to load.