summaryrefslogtreecommitdiff
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-08-03 04:10:08 +0000
committerRichard M. Stallman <rms@gnu.org>1997-08-03 04:10:08 +0000
commitfa0b3d466d268cf4775377d4a537143ea70a6117 (patch)
tree64daa026e5543d7c0e83475798c64c1469ea111d /lisp/cus-edit.el
parent1f312d8a934f6a16d6e29d2c6e7989c382547891 (diff)
downloademacs-fa0b3d466d268cf4775377d4a537143ea70a6117.tar.gz
(custom-face-value-create): Take account
of changes in the frame made outside of customize.
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el9
1 files 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"))))))