From b3f1f4a52de85d544be96acce97d7c8571f770c5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii <eliz@gnu.org> Date: Fri, 5 Dec 2008 16:30:01 +0000 Subject: [PATCH] (Character Sets): Document `map-charset-chars'. --- doc/lispref/ChangeLog | 1 + doc/lispref/nonascii.texi | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 96118a3afe9..952c2953a60 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -4,6 +4,7 @@ paragraph to speak about `undecided'. (Character Properties): Don't explain the meaning of each property; instead, identify their Unicode Standard names. + (Character Sets): Document `map-charset-chars'. 2008-12-02 Glenn Morris <rgm@gnu.org> diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 131b27d030e..28b1cf508db 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -626,6 +626,23 @@ integer, it is returned as a cons cell @code{(@var{high} . @var{low})} that fits the second argument of @code{decode-char} above. If @var{charset} doesn't have a codepoint for @var{char}, the value is @code{nil}. +@end defun + + The following function comes in handy for applying a certain +function to all or part of the characters in a charset: + +@defun map-charset-chars function charset &optional arg from to +Call @var{function} for characters in @var{charset}. @var{function} +is called with two arguments. The first one is a cons cell +@code{(@var{from} . @var{to})}, where @var{from} and @var{to} +indicate a range of characters contained in charset. The second +argument is the optional argument @var{arg}. + +By default, the range of codepoints passed to @var{function} includes +all the characters in @var{charset}, but optional arguments @var{from} +and @var{to} limit that to the range of characters between these two +codepoints. If either of them is @code{nil}, it defaults to the first +or last codepoint of @var{charset}, respectively. @end defun @node Scanning Charsets