]> git.eshelyaron.com Git - emacs.git/commitdiff
custom-theme-set-variables more resilient against removed libraries
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 1 Nov 2020 12:14:41 +0000 (13:14 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 1 Nov 2020 12:14:41 +0000 (13:14 +0100)
* 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

index cc445fe765ba686d59c6a3acea517159053fb6c7..cee4589543ee3e18c54e11877e29e61858b99204 100644 (file)
@@ -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)