Mercurial > emacs
changeset 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 | 5f08948e8c4b |
children | 7192dc1bfcf4 |
files | lisp/cus-edit.el |
diffstat | 1 files changed, 28 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/cus-edit.el Wed May 28 11:10:43 2003 +0000 +++ b/lisp/cus-edit.el Wed May 28 11:12:24 2003 +0000 @@ -2982,28 +2982,34 @@ "Set the state of WIDGET." (let* ((symbol (widget-value widget)) (comment (get symbol 'face-comment)) - tmp temp) - (widget-put widget :custom-state - (cond ((progn - (setq tmp (get symbol 'customized-face)) - (setq temp (get symbol 'customized-face-comment)) - (or tmp temp)) - (if (equal temp comment) - 'set - 'changed)) - ((progn - (setq tmp (get symbol 'saved-face)) - (setq temp (get symbol 'saved-face-comment)) - (or tmp temp)) - (if (equal temp comment) - 'saved - 'changed)) - ((get symbol 'face-defface-spec) - (if (equal comment nil) - 'standard - 'changed)) - (t - 'rogue))))) + tmp temp + (state + (cond ((progn + (setq tmp (get symbol 'customized-face)) + (setq temp (get symbol 'customized-face-comment)) + (or tmp temp)) + (if (equal temp comment) + 'set + 'changed)) + ((progn + (setq tmp (get symbol 'saved-face)) + (setq temp (get symbol 'saved-face-comment)) + (or tmp temp)) + (if (equal temp comment) + 'saved + 'changed)) + ((get symbol 'face-defface-spec) + (if (equal comment nil) + 'standard + 'changed)) + (t + 'rogue)))) + ;; If the user called set-face-attribute to change the default + ;; for new frames, this face is "set outside of Customize". + (if (and (not (eq state 'rogue)) + (get symbol 'face-modified)) + (setq state 'changed)) + (widget-put widget :custom-state state))) (defun custom-face-action (widget &optional event) "Show the menu for `custom-face' WIDGET.