aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2003-05-28 11:12:24 +0000
committerRichard M. Stallman <[email protected]>2003-05-28 11:12:24 +0000
commita4992f73f89c563c3b52e03498e8827b98eeec71 (patch)
tree99c682366813fa140d76f07248a11c2e77a9db15 /lisp/cus-edit.el
parentfc237647dc8db86e9595869dd1f485b0d5213823 (diff)
(custom-face-state-set): non-nil `face-modified'
means face was set outside of Custom.
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el50
1 files changed, 28 insertions, 22 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 312bc09204..0cf78ac1a0 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -2982,28 +2982,34 @@ widget. If FILTER is nil, ACTION is always valid.")
"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.