diff options
author | Richard M. Stallman <rms@gnu.org> | 2003-05-28 11:17:33 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2003-05-28 11:17:33 +0000 |
commit | 680da3f83b0b79c968cb4a73c861356436dcf0c0 (patch) | |
tree | 4e38b5ab693c4bdb6401412a9d41aca6fb219b91 /lisp/faces.el | |
parent | cccc806de7b564dcb5305aba07a41998414d9129 (diff) | |
download | emacs-680da3f83b0b79c968cb4a73c861356436dcf0c0.tar.gz |
(set-face-attribute): Set face-modified prop to t
when we change the new-frame defaults.
(face-spec-set): Set face-modified prop to nil
when we change the new-frame defaults.
Diffstat (limited to 'lisp/faces.el')
-rw-r--r-- | lisp/faces.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/faces.el b/lisp/faces.el index ee3a9d78cb4..2cf9f7dcdc6 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -664,6 +664,9 @@ of face names. Attributes from inherited faces are merged into the face like an underlying face would be, with higher priority than underlying faces." (let ((where (if (null frame) 0 frame))) (setq args (purecopy args)) + ;; If we set the new-frame defaults, this face is modified outside Custom. + (if (memq where '(0 t)) + (put face 'face-modified t)) (while args (internal-set-lisp-face-attribute face (car args) (purecopy (cadr args)) @@ -1378,7 +1381,11 @@ If SPEC is nil, do nothing." (setq attribute nil)))) (when attribute (set-face-attribute face frame attribute value))) - (setq attrs (cdr (cdr attrs)))))) + (setq attrs (cdr (cdr attrs))))) + ;; When we reset the face based on its spec, then it is unmodified + ;; as far as Custom is concerned. + (if (null frame) + (put face 'face-modified nil))) (defun face-attr-match-p (face attrs &optional frame) |