diff options
| author | Chong Yidong | 2007-04-04 15:57:04 +0000 |
|---|---|---|
| committer | Chong Yidong | 2007-04-04 15:57:04 +0000 |
| commit | 45948ea1b40e5ea0f1009c11845dd4ffd13860f6 (patch) | |
| tree | 7cfabd1f75224d6ae4d308b072c4284b4032f088 | |
| parent | 322cbd38d4609c3b23fa6ade2acdac2c93ee298d (diff) | |
| download | emacs-45948ea1b40e5ea0f1009c11845dd4ffd13860f6.tar.gz emacs-45948ea1b40e5ea0f1009c11845dd4ffd13860f6.zip | |
(Case Tables): Document with-case-table and ascii-case-table.
| -rw-r--r-- | lispref/strings.texi | 23 |
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. | |||
| 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. |