diff options
| author | Eli Zaretskii | 2022-12-30 16:43:38 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2022-12-30 16:43:38 +0200 |
| commit | 69b2aaaaded71b05b41b52ee5072d4d8babe33b6 (patch) | |
| tree | c387caac7707f25d072d3b7daea2c873b174f6ff | |
| parent | 0248fc9e1ac6aa0b802a334ace77c9cf0709e2c3 (diff) | |
| download | emacs-69b2aaaaded71b05b41b52ee5072d4d8babe33b6.tar.gz emacs-69b2aaaaded71b05b41b52ee5072d4d8babe33b6.zip | |
; Fix recently modified docs of 'set-face-attribute' (bug#52493)
* doc/lispref/display.texi (Attribute Functions): Clarify wording
and restore removed information about resetting attributes to
'unspecified' for future frames.
* lisp/faces.el (set-face-attribute): Minor copyedit of doc
string.
| -rw-r--r-- | doc/lispref/display.texi | 23 | ||||
| -rw-r--r-- | lisp/faces.el | 4 |
2 files changed, 17 insertions, 10 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 5397489e44f..604d5bd1a23 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi | |||
| @@ -3059,16 +3059,23 @@ values specified by @code{defface}. If @var{frame} is @code{nil}, | |||
| 3059 | this function sets the attributes for all existing frames, as well as | 3059 | this function sets the attributes for all existing frames, as well as |
| 3060 | for newly created frames. | 3060 | for newly created frames. |
| 3061 | 3061 | ||
| 3062 | To @emph{unset} the value of an attribute, that is, to indicate that | 3062 | To @emph{reset} the value of an attribute, that is, to indicate that |
| 3063 | the face doesn't by itself specify a value for the attribute, the | 3063 | the face doesn't by itself specify a value for the attribute, use the |
| 3064 | special value @code{unspecified} (@emph{not} @code{nil}!@:) must be | 3064 | special value @code{unspecified} (@emph{not} @code{nil}!@:) for the |
| 3065 | used. | 3065 | attribute, and set the @var{frame} argument to @code{t}, in addition |
| 3066 | to the call with @var{frame} set to @code{nil}. This is because the | ||
| 3067 | default attributes for newly created frames are merged with the face's | ||
| 3068 | spec in @code{defface} when a new frame is created, and so having | ||
| 3069 | @code{unspecified} in the default attributes for new frames will be | ||
| 3070 | unable to override @code{defface}; the special call to this function | ||
| 3071 | as described above will arrange for @code{defface} to be overridden. | ||
| 3066 | 3072 | ||
| 3067 | Note that the attribute-value pairs are evaluated in the order they | 3073 | Note that the attribute-value pairs are evaluated in the order they |
| 3068 | are specified, except the @code{:family} and @code{:foundry} | 3074 | are specified, with the exception of the @code{:family} and |
| 3069 | attributes, which are evaluated first. This means both that only the | 3075 | @code{:foundry} attributes, which are evaluated first. This means |
| 3070 | last value of a given attribute will be used, and that in some cases a | 3076 | that if a certain attribute is specified more than once, only the last |
| 3071 | different order will give different results. For example, when | 3077 | value will be used. It also means that in some cases a different |
| 3078 | order of attributes will produce different results. For example, when | ||
| 3072 | @code{:weight} is placed before @code{:font}, the weight value is | 3079 | @code{:weight} is placed before @code{:font}, the weight value is |
| 3073 | applied to the current font of the face, and might be rounded to the | 3080 | applied to the current font of the face, and might be rounded to the |
| 3074 | closest available weight of that font, whereas when @code{:font} is | 3081 | closest available weight of that font, whereas when @code{:font} is |
diff --git a/lisp/faces.el b/lisp/faces.el index fe683e437f5..0dd89be4738 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -691,8 +691,8 @@ what the FACE's face spec says, call this function with FRAME set to | |||
| 691 | t and the ATTRIBUTE's value set to `unspecified'. | 691 | t and the ATTRIBUTE's value set to `unspecified'. |
| 692 | 692 | ||
| 693 | Note that the ATTRIBUTE VALUE pairs are evaluated in the order | 693 | Note that the ATTRIBUTE VALUE pairs are evaluated in the order |
| 694 | they are specified, except the `:family' and `:foundry' | 694 | they are specified, except that the `:family' and `:foundry' |
| 695 | attributes which are evaluated first. | 695 | attributes are evaluated first. |
| 696 | 696 | ||
| 697 | The following attributes are recognized: | 697 | The following attributes are recognized: |
| 698 | 698 | ||