diff options
Diffstat (limited to 'lispref/strings.texi')
| -rw-r--r-- | lispref/strings.texi | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lispref/strings.texi b/lispref/strings.texi index 23f679d5bb9..af5a2fa14d3 100644 --- a/lispref/strings.texi +++ b/lispref/strings.texi | |||
| @@ -586,6 +586,7 @@ first character of @var{string} is the null character, @acronym{ASCII} code | |||
| 586 | @example | 586 | @example |
| 587 | (string-to-char "ABC") | 587 | (string-to-char "ABC") |
| 588 | @result{} 65 | 588 | @result{} 65 |
| 589 | |||
| 589 | (string-to-char "xyz") | 590 | (string-to-char "xyz") |
| 590 | @result{} 120 | 591 | @result{} 120 |
| 591 | (string-to-char "") | 592 | (string-to-char "") |
| @@ -1107,6 +1108,30 @@ This function returns the current buffer's case table. | |||
| 1107 | This sets the current buffer's case table to @var{table}. | 1108 | This sets the current buffer's case table to @var{table}. |
| 1108 | @end defun | 1109 | @end defun |
| 1109 | 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 | ||
| 1121 | @acronym{ASCII} characters; for example, in the Turkish language | ||
| 1122 | environment, the @acronym{ASCII} character @samp{I} is downcased into | ||
| 1123 | a Turkish ``dotless i''. This can interfere with code that requires | ||
| 1124 | ordinary ASCII case conversion, such as implementations of | ||
| 1125 | @acronym{ASCII}-based network protocols. In that case, use the | ||
| 1126 | @code{with-case-table} macro with the variable @var{ascii-case-table}, | ||
| 1127 | which stores the unmodified case table for the @acronym{ASCII} | ||
| 1128 | character set. | ||
| 1129 | |||
| 1130 | @defvar ascii-case-table | ||
| 1131 | The case table for the @acronym{ASCII} character set. This should not be | ||
| 1132 | modified by any language environment settings. | ||
| 1133 | @end defvar | ||
| 1134 | |||
| 1110 | The following three functions are convenient subroutines for packages | 1135 | The following three functions are convenient subroutines for packages |
| 1111 | that define non-@acronym{ASCII} character sets. They modify the specified | 1136 | that define non-@acronym{ASCII} character sets. They modify the specified |
| 1112 | case table @var{case-table}; they also modify the standard syntax table. | 1137 | case table @var{case-table}; they also modify the standard syntax table. |