664 |
like an underlying face would be, with higher priority than underlying faces." |
like an underlying face would be, with higher priority than underlying faces." |
665 |
(let ((where (if (null frame) 0 frame))) |
(let ((where (if (null frame) 0 frame))) |
666 |
(setq args (purecopy args)) |
(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)) |
670 |
(while args |
(while args |
671 |
(internal-set-lisp-face-attribute face (car args) |
(internal-set-lisp-face-attribute face (car args) |
672 |
(purecopy (cadr args)) |
(purecopy (cadr args)) |
1381 |
(setq attribute nil)))) |
(setq attribute nil)))) |
1382 |
(when attribute |
(when attribute |
1383 |
(set-face-attribute face frame attribute value))) |
(set-face-attribute face frame attribute value))) |
1384 |
(setq attrs (cdr (cdr attrs)))))) |
(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))) |
1389 |
|
|
1390 |
|
|
1391 |
(defun face-attr-match-p (face attrs &optional frame) |
(defun face-attr-match-p (face attrs &optional frame) |
1496 |
(1) different in appearance than the default face, and |
(1) different in appearance than the default face, and |
1497 |
(2) `close in spirit' to what the attributes specify, if not exact. |
(2) `close in spirit' to what the attributes specify, if not exact. |
1498 |
|
|
1499 |
Point (2) implies that a `:weight black' attribute will be satisified by |
Point (2) implies that a `:weight black' attribute will be satisfied by |
1500 |
any display that can display bold, and a `:foreground \"yellow\"' as long |
any display that can display bold, and a `:foreground \"yellow\"' as long |
1501 |
as it can display a yellowish color, but `:slant italic' will _not_ be |
as it can display a yellowish color, but `:slant italic' will _not_ be |
1502 |
satisified by the tty display code's automatic substitution of a `dim' |
satisfied by the tty display code's automatic substitution of a `dim' |
1503 |
face for italic." |
face for italic." |
1504 |
(let ((frame |
(let ((frame |
1505 |
(if (framep display) |
(if (framep display) |
1677 |
(defun face-set-after-frame-default (frame) |
(defun face-set-after-frame-default (frame) |
1678 |
"Set frame-local faces of FRAME from face specs and resources. |
"Set frame-local faces of FRAME from face specs and resources. |
1679 |
Initialize colors of certain faces from frame parameters." |
Initialize colors of certain faces from frame parameters." |
1680 |
;; Don't let frame creation fail because of an invalid face spec. |
(if (face-attribute 'default :font t) |
1681 |
|
(set-face-attribute 'default frame :font |
1682 |
|
(face-attribute 'default :font t)) |
1683 |
|
(set-face-attribute 'default frame :family |
1684 |
|
(face-attribute 'default :family t)) |
1685 |
|
(set-face-attribute 'default frame :height |
1686 |
|
(face-attribute 'default :height t)) |
1687 |
|
(set-face-attribute 'default frame :slant |
1688 |
|
(face-attribute 'default :slant t)) |
1689 |
|
(set-face-attribute 'default frame :weight |
1690 |
|
(face-attribute 'default :weight t)) |
1691 |
|
(set-face-attribute 'default frame :width |
1692 |
|
(face-attribute 'default :width t))) |
1693 |
(dolist (face (face-list)) |
(dolist (face (face-list)) |
1694 |
|
;; Don't let frame creation fail because of an invalid face spec. |
1695 |
(condition-case () |
(condition-case () |
1696 |
(when (not (equal face 'default)) |
(when (not (equal face 'default)) |
1697 |
(face-spec-set face (face-user-default-spec face) frame) |
(face-spec-set face (face-user-default-spec face) frame) |
2214 |
|
|
2215 |
(provide 'faces) |
(provide 'faces) |
2216 |
|
|
2217 |
|
;;; arch-tag: 19a4759f-2963-445f-b004-425b9aadd7d6 |
2218 |
;;; faces.el ends here |
;;; faces.el ends here |