aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2020-11-01 13:14:41 +0100
committerLars Ingebrigtsen2020-11-01 13:14:41 +0100
commit76d522e59ef03397e15d30bb3b4de3840c917e63 (patch)
tree1f2f367eb9e55dab29cfc6ee4cfa39d462831ff0
parenta0a60321fe8128dae8bab111a96fbe12f38e481c (diff)
downloademacs-76d522e59ef03397e15d30bb3b4de3840c917e63.tar.gz
emacs-76d522e59ef03397e15d30bb3b4de3840c917e63.zip
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).
-rw-r--r--lisp/custom.el5
1 files changed, 4 insertions, 1 deletions
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."
1010 set) 1010 set)
1011 (when requests 1011 (when requests
1012 (put symbol 'custom-requests requests) 1012 (put symbol 'custom-requests requests)
1013 (mapc #'require requests)) 1013 ;; Load any libraries that the setting has specified as
1014 ;; being required, but don't error out if the package has
1015 ;; been removed.
1016 (mapc (lambda (lib) (require lib nil t)) requests))
1014 (setq set (or (get symbol 'custom-set) #'custom-set-default)) 1017 (setq set (or (get symbol 'custom-set) #'custom-set-default))
1015 (put symbol 'saved-value (list value)) 1018 (put symbol 'saved-value (list value))
1016 (put symbol 'saved-variable-comment comment) 1019 (put symbol 'saved-variable-comment comment)