diff options
| author | Richard M. Stallman | 2003-05-28 11:12:24 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-05-28 11:12:24 +0000 |
| commit | a4992f73f89c563c3b52e03498e8827b98eeec71 (patch) | |
| tree | 99c682366813fa140d76f07248a11c2e77a9db15 | |
| parent | fc237647dc8db86e9595869dd1f485b0d5213823 (diff) | |
| download | emacs-a4992f73f89c563c3b52e03498e8827b98eeec71.tar.gz emacs-a4992f73f89c563c3b52e03498e8827b98eeec71.zip | |
(custom-face-state-set): non-nil `face-modified'
means face was set outside of Custom.
| -rw-r--r-- | lisp/cus-edit.el | 50 |
1 files changed, 28 insertions, 22 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 312bc092044..0cf78ac1a0f 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -2982,28 +2982,34 @@ widget. If FILTER is nil, ACTION is always valid.") | |||
| 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. |