diff options
| author | Eli Zaretskii | 2025-11-29 11:25:02 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2025-11-29 11:25:02 +0200 |
| commit | a74b69368353f644c245cd8e9ff443eaa3db4e6c (patch) | |
| tree | 8e5c5eb695fc51b3483fdc3fd61b1203ba0a2681 | |
| parent | 5c0d2ca79ae431c27cf0c45f15acc93721705386 (diff) | |
| download | emacs-a74b69368353f644c245cd8e9ff443eaa3db4e6c.tar.gz emacs-a74b69368353f644c245cd8e9ff443eaa3db4e6c.zip | |
Clarify use of ':font' in face-remapping functions
* lisp/face-remap.el (face-remap-add-relative)
(face-remap-set-base, buffer-face-set, buffer-face-toggle)
(buffer-face-mode-invoke): Clarify how to use ':font' in face
attribute lists. (Bug#79906)
| -rw-r--r-- | lisp/face-remap.el | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lisp/face-remap.el b/lisp/face-remap.el index bd8ead32127..7de0995f3d8 100644 --- a/lisp/face-remap.el +++ b/lisp/face-remap.el | |||
| @@ -122,6 +122,10 @@ of face attribute/value pairs. If more than one face is listed, | |||
| 122 | that specifies an aggregate face, in the same way as in a `face' | 122 | that specifies an aggregate face, in the same way as in a `face' |
| 123 | text property, except for possible priority changes noted below. | 123 | text property, except for possible priority changes noted below. |
| 124 | 124 | ||
| 125 | If a face property list specifies `:font', the value should be | ||
| 126 | either a font-spec object or the return value of `font-face-attributes' | ||
| 127 | called with a font object, font spec, or font entity. | ||
| 128 | |||
| 125 | The face remapping specified by SPECS takes effect alongside the | 129 | The face remapping specified by SPECS takes effect alongside the |
| 126 | remappings from other calls to `face-remap-add-relative' for the | 130 | remappings from other calls to `face-remap-add-relative' for the |
| 127 | same FACE, as well as the normal definition of FACE (at lowest | 131 | same FACE, as well as the normal definition of FACE (at lowest |
| @@ -192,6 +196,10 @@ The remaining arguments, SPECS, specify the base of the remapping. | |||
| 192 | Each one of SPECS should be either a face name or a property list | 196 | Each one of SPECS should be either a face name or a property list |
| 193 | of face attribute/value pairs, like in a `face' text property. | 197 | of face attribute/value pairs, like in a `face' text property. |
| 194 | 198 | ||
| 199 | If a face property list specifies `:font', the value should be | ||
| 200 | either a font-spec object or the return value of `font-face-attributes' | ||
| 201 | called with a font object, font spec, or font entity. | ||
| 202 | |||
| 195 | If SPECS is empty or a single face `eq' to FACE, call `face-remap-reset-base' | 203 | If SPECS is empty or a single face `eq' to FACE, call `face-remap-reset-base' |
| 196 | to use the normal definition of FACE as the base remapping; note that | 204 | to use the normal definition of FACE as the base remapping; note that |
| 197 | this is different from SPECS containing a single value nil, which means | 205 | this is different from SPECS containing a single value nil, which means |
| @@ -572,6 +580,10 @@ one face is listed, that specifies an aggregate face, like in a | |||
| 572 | `face' text property. If SPECS is nil or omitted, disable | 580 | `face' text property. If SPECS is nil or omitted, disable |
| 573 | `buffer-face-mode'. | 581 | `buffer-face-mode'. |
| 574 | 582 | ||
| 583 | If a face property list specifies `:font', the value should be | ||
| 584 | either a font-spec object or the return value of `font-face-attributes' | ||
| 585 | called with a font object, font spec, or font entity. | ||
| 586 | |||
| 575 | This function makes the variable `buffer-face-mode-face' buffer | 587 | This function makes the variable `buffer-face-mode-face' buffer |
| 576 | local, and sets it to FACE." | 588 | local, and sets it to FACE." |
| 577 | (interactive (list (read-face-name "Set buffer face" (face-at-point t)))) | 589 | (interactive (list (read-face-name "Set buffer face" (face-at-point t)))) |
| @@ -590,6 +602,10 @@ or a property list of face attributes and values. If more than | |||
| 590 | one face is listed, that specifies an aggregate face, like in a | 602 | one face is listed, that specifies an aggregate face, like in a |
| 591 | `face' text property. | 603 | `face' text property. |
| 592 | 604 | ||
| 605 | If a face property list specifies `:font', the value should be | ||
| 606 | either a font-spec object or the return value of `font-face-attributes' | ||
| 607 | called with a font object, font spec, or font entity. | ||
| 608 | |||
| 593 | If `buffer-face-mode' is already enabled, and is currently using | 609 | If `buffer-face-mode' is already enabled, and is currently using |
| 594 | the face specs SPECS, then it is disabled; if `buffer-face-mode' | 610 | the face specs SPECS, then it is disabled; if `buffer-face-mode' |
| 595 | is disabled, or is enabled and currently displaying some other | 611 | is disabled, or is enabled and currently displaying some other |
| @@ -615,6 +631,10 @@ SPECS can be any value suitable for a `face' text property, | |||
| 615 | including a face name, a plist of face attributes and values, | 631 | including a face name, a plist of face attributes and values, |
| 616 | or a list of faces. | 632 | or a list of faces. |
| 617 | 633 | ||
| 634 | If a face property list specifies `:font', the value should be | ||
| 635 | either a font-spec object or the return value of `font-face-attributes' | ||
| 636 | called with a font object, font spec, or font entity. | ||
| 637 | |||
| 618 | If INTERACTIVE is non-nil, display a message describing the | 638 | If INTERACTIVE is non-nil, display a message describing the |
| 619 | result. | 639 | result. |
| 620 | 640 | ||