diff options
| author | Richard M. Stallman | 1997-08-03 04:10:08 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-03 04:10:08 +0000 |
| commit | fa0b3d466d268cf4775377d4a537143ea70a6117 (patch) | |
| tree | 64daa026e5543d7c0e83475798c64c1469ea111d | |
| parent | 1f312d8a934f6a16d6e29d2c6e7989c382547891 (diff) | |
| download | emacs-fa0b3d466d268cf4775377d4a537143ea70a6117.tar.gz emacs-fa0b3d466d268cf4775377d4a537143ea70a6117.zip | |
(custom-face-value-create): Take account
of changes in the frame made outside of customize.
| -rw-r--r-- | lisp/cus-edit.el | 9 |
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.") | |||
| 2289 | symbol (selected-frame)))))) | 2289 | symbol (selected-frame)))))) |
| 2290 | (form (widget-get widget :custom-form)) | 2290 | (form (widget-get widget :custom-form)) |
| 2291 | (indent (widget-get widget :indent)) | 2291 | (indent (widget-get widget :indent)) |
| 2292 | (edit (widget-create-child-and-convert | 2292 | edit) |
| 2293 | ;; If the user has changed this face in some other way, | ||
| 2294 | ;; edit it as the user has specified it. | ||
| 2295 | (if (not (face-spec-match-p symbol spec (selected-frame))) | ||
| 2296 | (setq spec (list (list t (face-attr-construct symbol (selected-frame)))))) | ||
| 2297 | (setq edit (widget-create-child-and-convert | ||
| 2293 | widget | 2298 | widget |
| 2294 | (cond ((and (eq form 'selected) | 2299 | (cond ((and (eq form 'selected) |
| 2295 | (widget-apply custom-face-selected | 2300 | (widget-apply custom-face-selected |
| @@ -2303,7 +2308,7 @@ Match frames with dark backgrounds.") | |||
| 2303 | (t | 2308 | (t |
| 2304 | (when indent (insert-char ?\ indent)) | 2309 | (when indent (insert-char ?\ indent)) |
| 2305 | 'sexp)) | 2310 | 'sexp)) |
| 2306 | :value spec))) | 2311 | :value spec)) |
| 2307 | (custom-face-state-set widget) | 2312 | (custom-face-state-set widget) |
| 2308 | (widget-put widget :children (list edit))) | 2313 | (widget-put widget :children (list edit))) |
| 2309 | (message "Creating face editor...done")))))) | 2314 | (message "Creating face editor...done")))))) |