summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Aranda <maurooaranda@gmail.com>2020-09-04 15:35:41 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-09-04 15:35:41 +0200
commit6dcfabea97f54c0d875b89b403a4669bfe483211 (patch)
treed072f833eb470f04343e3dbca15ee298ad91c7fd
parent93d8ee1d6b2de28396e35ae9687f4bf66d19c5a7 (diff)
downloademacs-6dcfabea97f54c0d875b89b403a4669bfe483211.tar.gz
Do not remove unbound variables or faces when modifying a custom-theme
* 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).
-rw-r--r--lisp/cus-theme.el17
1 files changed, 8 insertions, 9 deletions
diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el
index b0decfe7b72..dc463e05f92 100644
--- a/lisp/cus-theme.el
+++ b/lisp/cus-theme.el
@@ -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 " ")