]> git.eshelyaron.com Git - emacs.git/commitdiff
(custom-face-value-create): Take account
authorRichard M. Stallman <rms@gnu.org>
Sun, 3 Aug 1997 04:10:08 +0000 (04:10 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 3 Aug 1997 04:10:08 +0000 (04:10 +0000)
of changes in the frame made outside of customize.

lisp/cus-edit.el

index fb4387b5dd8379d4528c6b9f78ddbee0b49a7164..62218c59dcdcb937c58691db488032d482faddb6 100644 (file)
@@ -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"))))))