Mercurial > emacs
comparison lisp/cus-edit.el @ 51277:caaa4fda6808
(custom-face-state-set): non-nil `face-modified'
means face was set outside of Custom.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 28 May 2003 11:12:24 +0000 |
parents | 73ab8e5b6d65 |
children | 0b5cb555fd17 |
comparison
equal
deleted
inserted
replaced
51276:5f08948e8c4b | 51277:caaa4fda6808 |
---|---|
2980 | 2980 |
2981 (defun custom-face-state-set (widget) | 2981 (defun custom-face-state-set (widget) |
2982 "Set the state of WIDGET." | 2982 "Set the state of WIDGET." |
2983 (let* ((symbol (widget-value widget)) | 2983 (let* ((symbol (widget-value widget)) |
2984 (comment (get symbol 'face-comment)) | 2984 (comment (get symbol 'face-comment)) |
2985 tmp temp) | 2985 tmp temp |
2986 (widget-put widget :custom-state | 2986 (state |
2987 (cond ((progn | 2987 (cond ((progn |
2988 (setq tmp (get symbol 'customized-face)) | 2988 (setq tmp (get symbol 'customized-face)) |
2989 (setq temp (get symbol 'customized-face-comment)) | 2989 (setq temp (get symbol 'customized-face-comment)) |
2990 (or tmp temp)) | 2990 (or tmp temp)) |
2991 (if (equal temp comment) | 2991 (if (equal temp comment) |
2992 'set | 2992 'set |
2993 'changed)) | 2993 'changed)) |
2994 ((progn | 2994 ((progn |
2995 (setq tmp (get symbol 'saved-face)) | 2995 (setq tmp (get symbol 'saved-face)) |
2996 (setq temp (get symbol 'saved-face-comment)) | 2996 (setq temp (get symbol 'saved-face-comment)) |
2997 (or tmp temp)) | 2997 (or tmp temp)) |
2998 (if (equal temp comment) | 2998 (if (equal temp comment) |
2999 'saved | 2999 'saved |
3000 'changed)) | 3000 'changed)) |
3001 ((get symbol 'face-defface-spec) | 3001 ((get symbol 'face-defface-spec) |
3002 (if (equal comment nil) | 3002 (if (equal comment nil) |
3003 'standard | 3003 'standard |
3004 'changed)) | 3004 'changed)) |
3005 (t | 3005 (t |
3006 'rogue))))) | 3006 '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))) | |
3007 | 3013 |
3008 (defun custom-face-action (widget &optional event) | 3014 (defun custom-face-action (widget &optional event) |
3009 "Show the menu for `custom-face' WIDGET. | 3015 "Show the menu for `custom-face' WIDGET. |
3010 Optional EVENT is the location for the menu." | 3016 Optional EVENT is the location for the menu." |
3011 (if (eq (widget-get widget :custom-state) 'hidden) | 3017 (if (eq (widget-get widget :custom-state) 'hidden) |