From: Eli Zaretskii Date: Sun, 14 Jun 2015 15:13:06 +0000 (+0300) Subject: Another improvement of documentation of set-fontset-font X-Git-Tag: emacs-25.0.90~1767 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2f09f8952489b5c90488faf66f71a4252aed5c2c;p=emacs.git Another improvement of documentation of set-fontset-font * doc/lispref/display.texi (Fontsets): Say explicitly that CHARACTER can be a single codepoint. * src/fontset.c (Fset_fontset_font): Doc fix. --- diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index b4e20371f35..9e9f8e3ca45 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -3284,7 +3284,7 @@ field. @defun set-fontset-font name character font-spec &optional frame add This function modifies the existing fontset @var{name} to use the font -matching with @var{font-spec} for the character @var{character}. +matching with @var{font-spec} for the specified @var{character}. If @var{name} is @code{nil}, this function modifies the fontset of the selected frame or that of @var{frame} if @var{frame} is not @@ -3293,10 +3293,10 @@ selected frame or that of @var{frame} if @var{frame} is not If @var{name} is @code{t}, this function modifies the default fontset, whose short name is @samp{fontset-default}. -@var{character} may be a cons; @code{(@var{from} . @var{to})}, where -@var{from} and @var{to} are character codepoints. In that case, use -@var{font-spec} for all characters in the range @var{from} and @var{to} -(inclusive). +In addition to specifying a single codepoint, @var{character} may be a +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 +characters in the range @var{from} and @var{to} (inclusive). @var{character} may be a charset. In that case, use @var{font-spec} for all character in the charsets. diff --git a/src/fontset.c b/src/fontset.c index 5fc92feb130..f1a3e597409 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -1411,9 +1411,11 @@ 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 the default fontset. -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 and -TO (inclusive). +TARGET may be a single character to use FONT-SPEC for. + +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 +and TO (inclusive). TARGET may be a script name symbol. In that case, use FONT-SPEC for all characters that belong to the script.