diff options
| author | Mauro Aranda | 2020-09-04 15:35:41 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2020-09-04 15:35:41 +0200 |
| commit | 6dcfabea97f54c0d875b89b403a4669bfe483211 (patch) | |
| tree | d072f833eb470f04343e3dbca15ee298ad91c7fd | |
| parent | 93d8ee1d6b2de28396e35ae9687f4bf66d19c5a7 (diff) | |
| download | emacs-6dcfabea97f54c0d875b89b403a4669bfe483211.tar.gz emacs-6dcfabea97f54c0d875b89b403a4669bfe483211.zip | |
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.el | 17 |
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." | |||
| 419 | (widget-value child) | 419 | (widget-value child) |
| 420 | ;; Child is null if the widget is closed (hidden). | 420 | ;; Child is null if the widget is closed (hidden). |
| 421 | (car (widget-get widget :shown-value))))) | 421 | (car (widget-get widget :shown-value))))) |
| 422 | (when (boundp symbol) | 422 | (unless (bolp) |
| 423 | (unless (bolp) | 423 | (princ "\n")) |
| 424 | (princ "\n")) | 424 | (princ " '(") |
| 425 | (princ " '(") | 425 | (prin1 symbol) |
| 426 | (prin1 symbol) | 426 | (princ " ") |
| 427 | (princ " ") | 427 | (prin1 (custom-quote value)) |
| 428 | (prin1 (custom-quote value)) | 428 | (princ ")")))) |
| 429 | (princ ")"))))) | ||
| 430 | (if (bolp) | 429 | (if (bolp) |
| 431 | (princ " ")) | 430 | (princ " ")) |
| 432 | (princ ")") | 431 | (princ ")") |
| @@ -454,7 +453,7 @@ It includes all faces in list FACES." | |||
| 454 | ;; Child is null if the widget is closed (hidden). | 453 | ;; Child is null if the widget is closed (hidden). |
| 455 | ((widget-get widget :shown-value)) | 454 | ((widget-get widget :shown-value)) |
| 456 | (t (custom-face-get-current-spec symbol))))) | 455 | (t (custom-face-get-current-spec symbol))))) |
| 457 | (when (and (facep symbol) value) | 456 | (when value |
| 458 | (princ (if (bolp) " '(" "\n '(")) | 457 | (princ (if (bolp) " '(" "\n '(")) |
| 459 | (prin1 symbol) | 458 | (prin1 symbol) |
| 460 | (princ " ") | 459 | (princ " ") |