From 76d522e59ef03397e15d30bb3b4de3840c917e63 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 1 Nov 2020 13:14:41 +0100 Subject: [PATCH] custom-theme-set-variables more resilient against removed libraries * lisp/custom.el (custom-theme-set-variables): Don't bug out on settings that require a library that has been removed (bug#38843). --- lisp/custom.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/custom.el b/lisp/custom.el index cc445fe765b..cee4589543e 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -1010,7 +1010,10 @@ COMMENT is a comment string about SYMBOL." set) (when requests (put symbol 'custom-requests requests) - (mapc #'require requests)) + ;; Load any libraries that the setting has specified as + ;; being required, but don't error out if the package has + ;; been removed. + (mapc (lambda (lib) (require lib nil t)) requests)) (setq set (or (get symbol 'custom-set) #'custom-set-default)) (put symbol 'saved-value (list value)) (put symbol 'saved-variable-comment comment) -- 2.39.2