mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-26 07:11:34 -08:00
(custom-face-state-set): non-nil `face-modified'
means face was set outside of Custom.
This commit is contained in:
parent
fc237647dc
commit
a4992f73f8
1 changed files with 28 additions and 22 deletions
|
|
@ -2982,28 +2982,34 @@ widget. If FILTER is nil, ACTION is always valid.")
|
||||||
"Set the state of WIDGET."
|
"Set the state of WIDGET."
|
||||||
(let* ((symbol (widget-value widget))
|
(let* ((symbol (widget-value widget))
|
||||||
(comment (get symbol 'face-comment))
|
(comment (get symbol 'face-comment))
|
||||||
tmp temp)
|
tmp temp
|
||||||
(widget-put widget :custom-state
|
(state
|
||||||
(cond ((progn
|
(cond ((progn
|
||||||
(setq tmp (get symbol 'customized-face))
|
(setq tmp (get symbol 'customized-face))
|
||||||
(setq temp (get symbol 'customized-face-comment))
|
(setq temp (get symbol 'customized-face-comment))
|
||||||
(or tmp temp))
|
(or tmp temp))
|
||||||
(if (equal temp comment)
|
(if (equal temp comment)
|
||||||
'set
|
'set
|
||||||
'changed))
|
'changed))
|
||||||
((progn
|
((progn
|
||||||
(setq tmp (get symbol 'saved-face))
|
(setq tmp (get symbol 'saved-face))
|
||||||
(setq temp (get symbol 'saved-face-comment))
|
(setq temp (get symbol 'saved-face-comment))
|
||||||
(or tmp temp))
|
(or tmp temp))
|
||||||
(if (equal temp comment)
|
(if (equal temp comment)
|
||||||
'saved
|
'saved
|
||||||
'changed))
|
'changed))
|
||||||
((get symbol 'face-defface-spec)
|
((get symbol 'face-defface-spec)
|
||||||
(if (equal comment nil)
|
(if (equal comment nil)
|
||||||
'standard
|
'standard
|
||||||
'changed))
|
'changed))
|
||||||
(t
|
(t
|
||||||
'rogue)))))
|
'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)
|
(defun custom-face-action (widget &optional event)
|
||||||
"Show the menu for `custom-face' WIDGET.
|
"Show the menu for `custom-face' WIDGET.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue