summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2007-04-04 15:57:04 +0000
committerChong Yidong <cyd@stupidchicken.com>2007-04-04 15:57:04 +0000
commit45948ea1b40e5ea0f1009c11845dd4ffd13860f6 (patch)
tree7cfabd1f75224d6ae4d308b072c4284b4032f088
parent322cbd38d4609c3b23fa6ade2acdac2c93ee298d (diff)
downloademacs-45948ea1b40e5ea0f1009c11845dd4ffd13860f6.tar.gz
(Case Tables): Document with-case-table and ascii-case-table.
-rw-r--r--lispref/strings.texi23
1 files changed, 23 insertions, 0 deletions
diff --git a/lispref/strings.texi b/lispref/strings.texi
index 0b2cd0e8685..788a7948b4f 100644
--- a/lispref/strings.texi
+++ b/lispref/strings.texi
@@ -1108,6 +1108,29 @@ This function returns the current buffer's case table.
This sets the current buffer's case table to @var{table}.
@end defun
+@defmac with-case-table table body@dots{}
+The @code{with-case-table} macro saves the current case table, makes
+@var{table} the current case table, evaluates the @var{body} forms,
+and finally restores the case table. The return value is the value of
+the last form in @var{body}. The case table is restored even in case
+of an abnormal exit via @code{throw} or error (@pxref{Nonlocal
+Exits}).
+@end defmac
+
+ Some language environments may modify the case conversions of ASCII
+characters; for example, in the Turkish language environment, the
+ASCII character ``I'' is downcased into a Turkish ``dotless i''. This
+can interfere with code that requires ordinary ASCII case conversion,
+such as implementations of ASCII-based network protocols. In that
+case, use the @code{with-case-table} macro with the variable
+@var{ascii-case-table}, which stores the unmodified case table for the
+ASCII character set.
+
+@defvar ascii-case-table
+The case table for the ASCII character set. This should not be
+modified by any language environment settings.
+@end defvar
+
The following three functions are convenient subroutines for packages
that define non-@acronym{ASCII} character sets. They modify the specified
case table @var{case-table}; they also modify the standard syntax table.