Mercurial > emacs
changeset 100248:3d8b80bc42ba
(Character Sets): Document `map-charset-chars'.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 05 Dec 2008 16:29:34 +0000 |
parents | 0caddaef2d80 |
children | 8cc99245d731 |
files | doc/lispref/nonascii.texi |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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