1510 |
(if (framep display) |
(if (framep display) |
1511 |
display |
display |
1512 |
(car (frames-on-display-list display))))) |
(car (frames-on-display-list display))))) |
1513 |
;; For now, we assume that non-tty displays can support everything. |
(if (not (memq (framep frame) '(x w32 mac))) |
1514 |
;; Later, we should add the ability to query about specific fonts, |
;; On ttys, `tty-supports-face-attributes-p' does all the work we need. |
1515 |
;; colors, etc. |
(tty-supports-face-attributes-p attributes frame) |
1516 |
(or (memq (framep frame) '(x w32 mac)) |
;; For now, we assume that non-tty displays can support everything, |
1517 |
(tty-supports-face-attributes-p attributes frame)))) |
;; and so we just check to see if any of the specified attributes is |
1518 |
|
;; different from the default -- though this probably isn't always |
1519 |
|
;; accurate for font-related attributes. Later, we should add the |
1520 |
|
;; ability to query about specific fonts, colors, etc. |
1521 |
|
(while (and attributes |
1522 |
|
(let* ((attr (car attributes)) |
1523 |
|
(val (cadr attributes)) |
1524 |
|
(default-val (face-attribute 'default attr frame))) |
1525 |
|
(if (and (stringp val) (stringp default-val)) |
1526 |
|
;; compare string attributes case-insensitively |
1527 |
|
(eq (compare-strings val nil nil default-val nil nil t) |
1528 |
|
t) |
1529 |
|
(equal val default-val)))) |
1530 |
|
(setq attributes (cddr attributes))) |
1531 |
|
(not (null attributes))))) |
1532 |
|
|
1533 |
|
|
1534 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |