From: Basil L. Contovounesios Date: Fri, 5 Mar 2021 11:02:20 +0000 (+0000) Subject: Don't override load-path in require-theme X-Git-Tag: emacs-28.0.90~3433 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0ddbacca7d45e68a3235489de94293335891806c;p=emacs.git 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) --- 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.