aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-05-28 11:17:33 +0000
committerRichard M. Stallman2003-05-28 11:17:33 +0000
commit680da3f83b0b79c968cb4a73c861356436dcf0c0 (patch)
tree4e38b5ab693c4bdb6401412a9d41aca6fb219b91
parentcccc806de7b564dcb5305aba07a41998414d9129 (diff)
downloademacs-680da3f83b0b79c968cb4a73c861356436dcf0c0.tar.gz
emacs-680da3f83b0b79c968cb4a73c861356436dcf0c0.zip
(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.
-rw-r--r--lisp/faces.el9
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
664like an underlying face would be, with higher priority than underlying faces." 664like an underlying face would be, with higher priority than underlying faces."
665 (let ((where (if (null frame) 0 frame))) 665 (let ((where (if (null frame) 0 frame)))
666 (setq args (purecopy args)) 666 (setq args (purecopy args))
667 ;; If we set the new-frame defaults, this face is modified outside Custom.
668 (if (memq where '(0 t))
669 (put face 'face-modified t))
667 (while args 670 (while args
668 (internal-set-lisp-face-attribute face (car args) 671 (internal-set-lisp-face-attribute face (car args)
669 (purecopy (cadr args)) 672 (purecopy (cadr args))
@@ -1378,7 +1381,11 @@ If SPEC is nil, do nothing."
1378 (setq attribute nil)))) 1381 (setq attribute nil))))
1379 (when attribute 1382 (when attribute
1380 (set-face-attribute face frame attribute value))) 1383 (set-face-attribute face frame attribute value)))
1381 (setq attrs (cdr (cdr attrs)))))) 1384 (setq attrs (cdr (cdr attrs)))))
1385 ;; When we reset the face based on its spec, then it is unmodified
1386 ;; as far as Custom is concerned.
1387 (if (null frame)
1388 (put face 'face-modified nil)))
1382 1389
1383 1390
1384(defun face-attr-match-p (face attrs &optional frame) 1391(defun face-attr-match-p (face attrs &optional frame)