]> git.eshelyaron.com Git - emacs.git/commitdiff
Do not remove unbound variables or faces when modifying a custom-theme
authorMauro Aranda <maurooaranda@gmail.com>
Fri, 4 Sep 2020 13:35:41 +0000 (15:35 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 4 Sep 2020 13:35:41 +0000 (15:35 +0200)
* lisp/cus-theme.el (custom-theme-write-variables
custom-theme-write-faces): Remove check for a bound symbol or for a
face name, so saving a theme does not remove not yet defined variables
or faces (bug#24727).

lisp/cus-theme.el

index b0decfe7b7298a8db040568aef6aebe377831792..dc463e05f92856a767e4a35c133a28f78a241fa8 100644 (file)
@@ -419,14 +419,13 @@ It includes all variables in list VARS."
                            (widget-value child)
                          ;; Child is null if the widget is closed (hidden).
                          (car (widget-get widget :shown-value)))))
-           (when (boundp symbol)
-             (unless (bolp)
-               (princ "\n"))
-             (princ " '(")
-             (prin1 symbol)
-             (princ " ")
-             (prin1 (custom-quote value))
-             (princ ")")))))
+           (unless (bolp)
+             (princ "\n"))
+           (princ " '(")
+           (prin1 symbol)
+           (princ " ")
+           (prin1 (custom-quote value))
+           (princ ")"))))
       (if (bolp)
          (princ " "))
       (princ ")")
@@ -454,7 +453,7 @@ It includes all faces in list FACES."
                   ;; Child is null if the widget is closed (hidden).
                   ((widget-get widget :shown-value))
                   (t (custom-face-get-current-spec symbol)))))
-           (when (and (facep symbol) value)
+           (when value
              (princ (if (bolp) " '(" "\n '("))
              (prin1 symbol)
              (princ " ")