summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2018-08-08 18:24:45 +0300
committerEli Zaretskii <eliz@gnu.org>2018-08-08 18:24:45 +0300
commit5132a5856dcf0278811740551f435d8f301d2a72 (patch)
tree124cf1b0fd2913e972c6be9a609f72bd2b5230bc
parentcd9032532d119b35685dc078b8156023122f6dcd (diff)
downloademacs-5132a5856dcf0278811740551f435d8f301d2a72.tar.gz
emacs-5132a5856dcf0278811740551f435d8f301d2a72.tar.bz2
emacs-5132a5856dcf0278811740551f435d8f301d2a72.zip
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)
-rw-r--r--doc/lispref/display.texi14
-rw-r--r--src/fontset.c27
2 files changed, 24 insertions, 17 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 0f7322a6407..aed103ee2c9 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -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
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.
+@var{character} may be a charset (@pxref{Character Sets}). In that
+case, use @var{font-spec} for all the characters in the charset.
-@var{character} may be a script name. In that case, use
-@var{font-spec} for all character in the charsets.
+@var{character} may be a script name (@pxref{Character Properties}).
+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
@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
(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
there's no font for the specified @var{character}. This is useful,
diff --git a/src/fontset.c b/src/fontset.c
index 6ca64068717..e72354078ca 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -1442,23 +1442,26 @@ DEFUN ("set-fontset-font", Fset_fontset_font, Sset_fontset_font, 3, 5, 0,
doc: /*
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.
+NAME is a fontset name (a string), nil for the fontset of FRAME,
+or t for the default fontset.
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).
+In that case, use FONT-SPEC for all the characters in the range
+between 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.
+TARGET may be a script symbol. In that case, use FONT-SPEC for
+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
-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
-that no FONT-SPEC is specified.
+TARGET may be nil. In that case, use FONT-SPEC for any character for
+which no font-spec is specified.
FONT-SPEC may one of these:
* 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.
* nil, which explicitly specifies that there's no font for TARGET.
-Optional 4th argument FRAME is a frame or nil for the selected frame
-that is concerned in the case that NAME is nil.
+Optional 4th argument FRAME is a frame, or nil for the selected frame,
+to be considered in the case that NAME is nil.
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
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)