* 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)
(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.