2982 |
"Set the state of WIDGET." |
"Set the state of WIDGET." |
2983 |
(let* ((symbol (widget-value widget)) |
(let* ((symbol (widget-value widget)) |
2984 |
(comment (get symbol 'face-comment)) |
(comment (get symbol 'face-comment)) |
2985 |
tmp temp) |
tmp temp |
2986 |
(widget-put widget :custom-state |
(state |
2987 |
(cond ((progn |
(cond ((progn |
2988 |
(setq tmp (get symbol 'customized-face)) |
(setq tmp (get symbol 'customized-face)) |
2989 |
(setq temp (get symbol 'customized-face-comment)) |
(setq temp (get symbol 'customized-face-comment)) |
2990 |
(or tmp temp)) |
(or tmp temp)) |
2991 |
(if (equal temp comment) |
(if (equal temp comment) |
2992 |
'set |
'set |
2993 |
'changed)) |
'changed)) |
2994 |
((progn |
((progn |
2995 |
(setq tmp (get symbol 'saved-face)) |
(setq tmp (get symbol 'saved-face)) |
2996 |
(setq temp (get symbol 'saved-face-comment)) |
(setq temp (get symbol 'saved-face-comment)) |
2997 |
(or tmp temp)) |
(or tmp temp)) |
2998 |
(if (equal temp comment) |
(if (equal temp comment) |
2999 |
'saved |
'saved |
3000 |
'changed)) |
'changed)) |
3001 |
((get symbol 'face-defface-spec) |
((get symbol 'face-defface-spec) |
3002 |
(if (equal comment nil) |
(if (equal comment nil) |
3003 |
'standard |
'standard |
3004 |
'changed)) |
'changed)) |
3005 |
(t |
(t |
3006 |
'rogue))))) |
'rogue)))) |
3007 |
|
;; If the user called set-face-attribute to change the default |
3008 |
|
;; for new frames, this face is "set outside of Customize". |
3009 |
|
(if (and (not (eq state 'rogue)) |
3010 |
|
(get symbol 'face-modified)) |
3011 |
|
(setq state 'changed)) |
3012 |
|
(widget-put widget :custom-state state))) |
3013 |
|
|
3014 |
(defun custom-face-action (widget &optional event) |
(defun custom-face-action (widget &optional event) |
3015 |
"Show the menu for `custom-face' WIDGET. |
"Show the menu for `custom-face' WIDGET. |