From fa0b3d466d268cf4775377d4a537143ea70a6117 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 3 Aug 1997 04:10:08 +0000 Subject: [PATCH] (custom-face-value-create): Take account of changes in the frame made outside of customize. --- lisp/cus-edit.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index fb4387b5dd8..62218c59dcd 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -2289,7 +2289,12 @@ Match frames with dark backgrounds.") symbol (selected-frame)))))) (form (widget-get widget :custom-form)) (indent (widget-get widget :indent)) - (edit (widget-create-child-and-convert + edit) + ;; If the user has changed this face in some other way, + ;; edit it as the user has specified it. + (if (not (face-spec-match-p symbol spec (selected-frame))) + (setq spec (list (list t (face-attr-construct symbol (selected-frame)))))) + (setq edit (widget-create-child-and-convert widget (cond ((and (eq form 'selected) (widget-apply custom-face-selected @@ -2303,7 +2308,7 @@ Match frames with dark backgrounds.") (t (when indent (insert-char ?\ indent)) 'sexp)) - :value spec))) + :value spec)) (custom-face-state-set widget) (widget-put widget :children (list edit))) (message "Creating face editor...done")))))) -- 2.39.2