changeset 19097:200ff7e7d620

(custom-face-value-create): Take account of changes in the frame made outside of customize.
author Richard M. Stallman <rms@gnu.org>
date Sun, 03 Aug 1997 04:10:08 +0000
parents 0724276f0e01
children 51fdd58dc112
files lisp/cus-edit.el
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/cus-edit.el	Sun Aug 03 03:02:05 1997 +0000
+++ b/lisp/cus-edit.el	Sun Aug 03 04:10:08 1997 +0000
@@ -2289,7 +2289,12 @@
 					     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 @@
 				 (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"))))))