Improve documentation of 'set-fontset-font'

* doc/lispref/display.texi (Fontsets): Fix description of
'set-fontset-font'.
* src/fontset.c (Fset_fontset_font): Doc fix.  (Bug#32401)
This commit is contained in:
Eli Zaretskii 2018-08-08 18:24:45 +03:00
parent cd9032532d
commit 5132a5856d
2 changed files with 24 additions and 17 deletions

View file

@ -3457,11 +3457,15 @@ cons @code{(@var{from} . @var{to})}, where @var{from} and @var{to} are
character codepoints. In that case, use @var{font-spec} for all the character codepoints. In that case, use @var{font-spec} for all the
characters in the range @var{from} and @var{to} (inclusive). characters in the range @var{from} and @var{to} (inclusive).
@var{character} may be a charset. In that case, use @var{character} may be a charset (@pxref{Character Sets}). In that
@var{font-spec} for all character in the charsets. case, use @var{font-spec} for all the characters in the charset.
@var{character} may be a script name. In that case, use @var{character} may be a script name (@pxref{Character Properties}).
@var{font-spec} for all character in the charsets. In that case, use @var{font-spec} for all the characters belonging to
the script.
@var{character} may be @code{nil}, which means to use @var{font-spec}
for any character which no font-spec is specified.
@var{font-spec} may be a font-spec object created by the function @var{font-spec} may be a font-spec object created by the function
@code{font-spec} (@pxref{Low-Level Font}). @code{font-spec} (@pxref{Low-Level Font}).
@ -3471,7 +3475,7 @@ where @var{family} is a family name of a font (possibly including a
foundry name at the head), @var{registry} is a registry name of a font foundry name at the head), @var{registry} is a registry name of a font
(possibly including an encoding name at the tail). (possibly including an encoding name at the tail).
@var{font-spec} may be a font name string. @var{font-spec} may be a font name, a string.
@var{font-spec} may be @code{nil}, which explicitly specifies that @var{font-spec} may be @code{nil}, which explicitly specifies that
there's no font for the specified @var{character}. This is useful, there's no font for the specified @var{character}. This is useful,

View file

@ -1442,23 +1442,26 @@ DEFUN ("set-fontset-font", Fset_fontset_font, Sset_fontset_font, 3, 5, 0,
doc: /* doc: /*
Modify fontset NAME to use FONT-SPEC for TARGET characters. Modify fontset NAME to use FONT-SPEC for TARGET characters.
NAME is a fontset name string, nil for the fontset of FRAME, or t for NAME is a fontset name (a string), nil for the fontset of FRAME,
the default fontset. or t for the default fontset.
TARGET may be a single character to use FONT-SPEC for. TARGET may be a single character to use FONT-SPEC for.
Target may be a cons (FROM . TO), where FROM and TO are characters. Target may be a cons (FROM . TO), where FROM and TO are characters.
In that case, use FONT-SPEC for all characters in the range FROM In that case, use FONT-SPEC for all the characters in the range
and TO (inclusive). between FROM and TO (inclusive).
TARGET may be a script name symbol. In that case, use FONT-SPEC for TARGET may be a script symbol. In that case, use FONT-SPEC for
all characters that belong to the script. all the characters that belong to the script. See the variable
`script-representative-chars' for the list of known scripts.
TARGET may be a charset. In that case, use FONT-SPEC for all TARGET may be a charset. In that case, use FONT-SPEC for all
characters in the charset. the characters in the charset. See `list-character-sets' and
`list-charset-chars' for the list of character sets and their
characters.
TARGET may be nil. In that case, use FONT-SPEC for any characters for TARGET may be nil. In that case, use FONT-SPEC for any character for
that no FONT-SPEC is specified. which no font-spec is specified.
FONT-SPEC may one of these: FONT-SPEC may one of these:
* A font-spec object made by the function `font-spec' (which see). * A font-spec object made by the function `font-spec' (which see).
@ -1468,11 +1471,11 @@ FONT-SPEC may one of these:
* A font name string. * A font name string.
* nil, which explicitly specifies that there's no font for TARGET. * nil, which explicitly specifies that there's no font for TARGET.
Optional 4th argument FRAME is a frame or nil for the selected frame Optional 4th argument FRAME is a frame, or nil for the selected frame,
that is concerned in the case that NAME is nil. to be considered in the case that NAME is nil.
Optional 5th argument ADD, if non-nil, specifies how to add FONT-SPEC Optional 5th argument ADD, if non-nil, specifies how to add FONT-SPEC
to the font specifications for TARGET previously set. If it is to the previously set font specifications for TARGET. If it is
`prepend', FONT-SPEC is prepended. If it is `append', FONT-SPEC is `prepend', FONT-SPEC is prepended. If it is `append', FONT-SPEC is
appended. By default, FONT-SPEC overrides the previous settings. */) appended. By default, FONT-SPEC overrides the previous settings. */)
(Lisp_Object name, Lisp_Object target, Lisp_Object font_spec, Lisp_Object frame, Lisp_Object add) (Lisp_Object name, Lisp_Object target, Lisp_Object font_spec, Lisp_Object frame, Lisp_Object add)