[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-27 071483b: Fix reverting customizations
From: |
Eli Zaretskii |
Subject: |
emacs-27 071483b: Fix reverting customizations |
Date: |
Wed, 1 Jan 2020 12:51:06 -0500 (EST) |
branch: emacs-27
commit 071483b6f516b737182440264ec11c94ada53dc3
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix reverting customizations
* lisp/custom.el (custom-push-theme): Don't use setcar to modify
the recorded value of PROP; instead, cons a new property list by
deleting the old value and adding the new one. (Bug#38812)
---
lisp/custom.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/custom.el b/lisp/custom.el
index ba7f999..037f6c5 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -886,7 +886,10 @@ See `custom-known-themes' for a list of known themes."
(put theme 'theme-settings
(cons (list prop symbol theme value)
(delq res theme-settings)))
- (setcar (cdr setting) value)))
+ ;; It's tempting to use setcar here, but that could
+ ;; inadvertently modify other properties in SYMBOL's proplist,
+ ;; if those just happen to share elements with the value of PROP.
+ (put symbol prop (cons (list theme value) (delq setting old)))))
;; Add a new setting:
(t
(when (custom--should-apply-setting theme)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-27 071483b: Fix reverting customizations,
Eli Zaretskii <=