From 0ddbacca7d45e68a3235489de94293335891806c Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Fri, 5 Mar 2021 11:02:20 +0000 Subject: [PATCH] Don't override load-path in require-theme * 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/custom.el b/lisp/custom.el index b9fccce5833..85e5d65ffb2 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -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. -- 2.39.2