comparison lispref/strings.texi @ 76944:ceb213515795

(Case Tables): Document with-case-table and ascii-case-table.
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 04 Apr 2007 15:57:04 +0000
parents 1eb21d4498cf
children 0f5bdc282b8f
comparison
equal deleted inserted replaced
76943:fd3e6a10551d 76944:ceb213515795
1106 1106
1107 @defun set-case-table table 1107 @defun set-case-table table
1108 This sets the current buffer's case table to @var{table}. 1108 This sets the current buffer's case table to @var{table}.
1109 @end defun 1109 @end defun
1110 1110
1111 @defmac with-case-table table body@dots{}
1112 The @code{with-case-table} macro saves the current case table, makes
1113 @var{table} the current case table, evaluates the @var{body} forms,
1114 and finally restores the case table. The return value is the value of
1115 the last form in @var{body}. The case table is restored even in case
1116 of an abnormal exit via @code{throw} or error (@pxref{Nonlocal
1117 Exits}).
1118 @end defmac
1119
1120 Some language environments may modify the case conversions of ASCII
1121 characters; for example, in the Turkish language environment, the
1122 ASCII character ``I'' is downcased into a Turkish ``dotless i''. This
1123 can interfere with code that requires ordinary ASCII case conversion,
1124 such as implementations of ASCII-based network protocols. In that
1125 case, use the @code{with-case-table} macro with the variable
1126 @var{ascii-case-table}, which stores the unmodified case table for the
1127 ASCII character set.
1128
1129 @defvar ascii-case-table
1130 The case table for the ASCII character set. This should not be
1131 modified by any language environment settings.
1132 @end defvar
1133
1111 The following three functions are convenient subroutines for packages 1134 The following three functions are convenient subroutines for packages
1112 that define non-@acronym{ASCII} character sets. They modify the specified 1135 that define non-@acronym{ASCII} character sets. They modify the specified
1113 case table @var{case-table}; they also modify the standard syntax table. 1136 case table @var{case-table}; they also modify the standard syntax table.
1114 @xref{Syntax Tables}. Normally you would use these functions to change 1137 @xref{Syntax Tables}. Normally you would use these functions to change
1115 the standard case table. 1138 the standard case table.