52 |
example, if `:slant' appears before `:height', font selection first |
example, if `:slant' appears before `:height', font selection first |
53 |
tries to find a font with a suitable slant, even if this results in |
tries to find a font with a suitable slant, even if this results in |
54 |
a font height that isn't optimal." |
a font height that isn't optimal." |
55 |
:tag "Font selection order." |
:tag "Font selection order" |
56 |
:type '(list symbol symbol symbol symbol) |
:type '(list symbol symbol symbol symbol) |
57 |
:group 'font-selection |
:group 'font-selection |
58 |
:set #'(lambda (symbol value) |
:set #'(lambda (symbol value) |
68 |
Each element has the form (FAMILY ALTERNATIVE1 ALTERNATIVE2 ...). |
Each element has the form (FAMILY ALTERNATIVE1 ALTERNATIVE2 ...). |
69 |
If fonts of family FAMILY can't be loaded, try ALTERNATIVE1, then |
If fonts of family FAMILY can't be loaded, try ALTERNATIVE1, then |
70 |
ALTERNATIVE2 etc." |
ALTERNATIVE2 etc." |
71 |
:tag "Alternative font families to try." |
:tag "Alternative font families to try" |
72 |
:type '(repeat (repeat string)) |
:type '(repeat (repeat string)) |
73 |
:group 'font-selection |
:group 'font-selection |
74 |
:set #'(lambda (symbol value) |
:set #'(lambda (symbol value) |
93 |
If fonts of registry REGISTRY can be loaded, font selection |
If fonts of registry REGISTRY can be loaded, font selection |
94 |
tries to find a best matching font among all fonts of registry |
tries to find a best matching font among all fonts of registry |
95 |
REGISTRY, ALTERNATIVE1, ALTERNATIVE2, and etc." |
REGISTRY, ALTERNATIVE1, ALTERNATIVE2, and etc." |
96 |
:tag "Alternative font registries to try." |
:tag "Alternative font registries to try" |
97 |
:type '(repeat (repeat string)) |
:type '(repeat (repeat string)) |
98 |
:version "21.1" |
:version "21.1" |
99 |
:group 'font-selection |
:group 'font-selection |
148 |
If NEW-FACE already exists as a face, it is modified to be like |
If NEW-FACE already exists as a face, it is modified to be like |
149 |
OLD-FACE. If it doesn't already exist, it is created. |
OLD-FACE. If it doesn't already exist, it is created. |
150 |
|
|
151 |
If the optional argument FRAME is given as a frame, NEW-FACE is |
If the optional argument FRAME is given as a frame, NEW-FACE is |
152 |
changed on FRAME only. |
changed on FRAME only. |
153 |
If FRAME is t, the frame-independent default specification for OLD-FACE |
If FRAME is t, the frame-independent default specification for OLD-FACE |
154 |
is copied to NEW-FACE. |
is copied to NEW-FACE. |
196 |
If the optional argument FRAME is given, this gets the face NAME for |
If the optional argument FRAME is given, this gets the face NAME for |
197 |
that frame; otherwise, it uses the selected frame. |
that frame; otherwise, it uses the selected frame. |
198 |
If FRAME is the symbol t, then the global, non-frame face is returned. |
If FRAME is the symbol t, then the global, non-frame face is returned. |
199 |
If NAME is already a face, it is simply returned. |
If NAME is already a face, it is simply returned." |
|
|
|
|
This function is defined for compatibility with Emacs 20.2. It |
|
|
should not be used anymore." |
|
200 |
(or (facep name) |
(or (facep name) |
201 |
(check-face name))) |
(check-face name))) |
202 |
(make-obsolete 'internal-get-face "See `facep' and `check-face'." "21.1") |
(make-obsolete 'internal-get-face "see `facep' and `check-face'." "21.1") |
203 |
|
|
204 |
|
|
205 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
224 |
;; support faces in display table entries. |
;; support faces in display table entries. |
225 |
|
|
226 |
(defun face-id (face &optional frame) |
(defun face-id (face &optional frame) |
227 |
"Return the interNal ID of face with name FACE. |
"Return the internal ID of face with name FACE. |
228 |
If optional argument FRAME is nil or omitted, use the selected frame." |
If optional argument FRAME is nil or omitted, use the selected frame." |
229 |
(check-face face) |
(check-face face) |
230 |
(get face 'face)) |
(get face 'face)) |
1135 |
;; The name list-faces would be more consistent, but let's avoid a |
;; The name list-faces would be more consistent, but let's avoid a |
1136 |
;; conflict with Lucid, which uses that name differently. |
;; conflict with Lucid, which uses that name differently. |
1137 |
|
|
1138 |
|
(defvar help-xref-stack) |
1139 |
(defun list-faces-display () |
(defun list-faces-display () |
1140 |
"List all faces, using the same sample text in each. |
"List all faces, using the same sample text in each. |
1141 |
The sample text is a string that comes from the variable |
The sample text is a string that comes from the variable |
1243 |
(princ (concat " (" customize-label ")\n")) |
(princ (concat " (" customize-label ")\n")) |
1244 |
(insert "Documentation: " |
(insert "Documentation: " |
1245 |
(or (face-documentation f) |
(or (face-documentation f) |
1246 |
"not documented as a face.") |
"Not documented as a face.") |
1247 |
"\n\n") |
"\n\n") |
1248 |
(with-current-buffer standard-output |
(with-current-buffer standard-output |
1249 |
(save-excursion |
(save-excursion |
1531 |
according to the `background-mode' and `display-type' frame parameters." |
according to the `background-mode' and `display-type' frame parameters." |
1532 |
(let* ((bg-resource |
(let* ((bg-resource |
1533 |
(and window-system |
(and window-system |
1534 |
(x-get-resource ".backgroundMode" "BackgroundMode"))) |
(x-get-resource "backgroundMode" "BackgroundMode"))) |
1535 |
(bg-color (frame-parameter frame 'background-color)) |
(bg-color (frame-parameter frame 'background-color)) |
1536 |
(bg-mode |
(bg-mode |
1537 |
(cond (frame-background-mode) |
(cond (frame-background-mode) |
1670 |
(defun face-set-after-frame-default (frame) |
(defun face-set-after-frame-default (frame) |
1671 |
"Set frame-local faces of FRAME from face specs and resources. |
"Set frame-local faces of FRAME from face specs and resources. |
1672 |
Initialize colors of certain faces from frame parameters." |
Initialize colors of certain faces from frame parameters." |
1673 |
|
;; Don't let frame creation fail because of an invalid face spec. |
1674 |
(dolist (face (face-list)) |
(dolist (face (face-list)) |
1675 |
(when (not (equal face 'default)) |
(condition-case () |
1676 |
(face-spec-set face (face-user-default-spec face) frame) |
(when (not (equal face 'default)) |
1677 |
(internal-merge-in-global-face face frame) |
(face-spec-set face (face-user-default-spec face) frame) |
1678 |
(when (and (memq window-system '(x w32 mac)) |
(internal-merge-in-global-face face frame) |
1679 |
(or (not (boundp 'inhibit-default-face-x-resources)) |
(when (and (memq window-system '(x w32 mac)) |
1680 |
(not (eq face 'default)))) |
(or (not (boundp 'inhibit-default-face-x-resources)) |
1681 |
(make-face-x-resource-internal face frame)))) |
(not (eq face 'default)))) |
1682 |
|
(make-face-x-resource-internal face frame))) |
1683 |
|
(error nil))) |
1684 |
;; Initialize attributes from frame parameters. |
;; Initialize attributes from frame parameters. |
1685 |
(let ((params '((foreground-color default :foreground) |
(let ((params '((foreground-color default :foreground) |
1686 |
(background-color default :background) |
(background-color default :background) |
1755 |
;; Update a frame's faces when we change its default font. |
;; Update a frame's faces when we change its default font. |
1756 |
|
|
1757 |
(defalias 'frame-update-faces 'ignore) |
(defalias 'frame-update-faces 'ignore) |
1758 |
(make-obsolete 'frame-update-faces "No longer necessary" "21.1") |
(make-obsolete 'frame-update-faces "no longer necessary." "21.1") |
1759 |
|
|
1760 |
;; Update the colors of FACE, after FRAME's own colors have been |
;; Update the colors of FACE, after FRAME's own colors have been |
1761 |
;; changed. |
;; changed. |
1811 |
(put 'modeline-inactive 'face-alias 'mode-line-inactive) |
(put 'modeline-inactive 'face-alias 'mode-line-inactive) |
1812 |
|
|
1813 |
(defface header-line |
(defface header-line |
1814 |
'((t |
'((((type tty)) |
|
:inherit mode-line) |
|
|
(((type tty)) |
|
1815 |
;; This used to be `:inverse-video t', but that doesn't look very |
;; This used to be `:inverse-video t', but that doesn't look very |
1816 |
;; good when combined with inverse-video mode-lines and multiple |
;; good when combined with inverse-video mode-lines and multiple |
1817 |
;; windows. Underlining looks better, and is more consistent with |
;; windows. Underlining looks better, and is more consistent with |
1824 |
:underline t) |
:underline t) |
1825 |
(((class color grayscale) (background light)) |
(((class color grayscale) (background light)) |
1826 |
:background "grey90" :foreground "grey20" |
:background "grey90" :foreground "grey20" |
1827 |
:box nil) |
:box nil |
1828 |
|
:inherit mode-line) |
1829 |
(((class color grayscale) (background dark)) |
(((class color grayscale) (background dark)) |
1830 |
:background "grey20" :foreground "grey90" |
:background "grey20" :foreground "grey90" |
1831 |
:box nil) |
:box nil |
1832 |
|
:inherit mode-line) |
1833 |
(((class mono) (background light)) |
(((class mono) (background light)) |
1834 |
:background "white" :foreground "black" |
:background "white" :foreground "black" |
1835 |
:inverse-video nil |
:inverse-video nil |
1836 |
:box nil |
:box nil |
1837 |
:underline t) |
:underline t |
1838 |
|
:inherit mode-line) |
1839 |
(((class mono) (background dark)) |
(((class mono) (background dark)) |
1840 |
:background "black" :foreground "white" |
:background "black" :foreground "white" |
1841 |
:inverse-video nil |
:inverse-video nil |
1842 |
:box nil |
:box nil |
1843 |
:underline t)) |
:underline t |
1844 |
|
:inherit mode-line)) |
1845 |
"Basic header-line face." |
"Basic header-line face." |
1846 |
:version "21.1" |
:version "21.1" |
1847 |
:group 'basic-faces) |
:group 'basic-faces) |