# HG changeset patch # User Eli Zaretskii # Date 1228494574 0 # Node ID 3d8b80bc42ba0eaf7841833aeade8e446ef2adfc # Parent 0caddaef2d809e1161280c8867fe00c7ea481576 (Character Sets): Document `map-charset-chars'. diff -r 0caddaef2d80 -r 3d8b80bc42ba doc/lispref/nonascii.texi --- a/doc/lispref/nonascii.texi Fri Dec 05 16:11:37 2008 +0000 +++ b/doc/lispref/nonascii.texi Fri Dec 05 16:29:34 2008 +0000 @@ -628,6 +628,23 @@ @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 @section Scanning for Character Sets