Mercurial > hg > xemacs-beta
comparison src/buffer.h @ 4962:e813cf16c015
merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Mon, 01 Feb 2010 05:29:05 -0600 |
parents | 6ef8256a020a |
children | 16112448d484 |
comparison
equal
deleted
inserted
replaced
4961:b90f8cf474e0 | 4962:e813cf16c015 |
---|---|
1186 DECLARE_INLINE_HEADER ( | 1186 DECLARE_INLINE_HEADER ( |
1187 Lisp_Object | 1187 Lisp_Object |
1188 BUFFER_CASE_TABLE (struct buffer *buf) | 1188 BUFFER_CASE_TABLE (struct buffer *buf) |
1189 ) | 1189 ) |
1190 { | 1190 { |
1191 return buf ? buf->case_table : Vstandard_case_table; | 1191 return buf ? buf->case_table : current_buffer->case_table; |
1192 /* When buf=0, was Vstandard_case_table, but this sucks. If I set a | |
1193 different case table in this buffer, operations that use a case table | |
1194 by default should use the current one. */ | |
1192 } | 1195 } |
1193 | 1196 |
1194 /* Macros used below. */ | 1197 /* Macros used below. */ |
1195 #define DOWNCASE_TABLE_OF(buf, c) \ | 1198 #define DOWNCASE_TABLE_OF(buf, c) \ |
1196 TRT_TABLE_OF (XCASE_TABLE_DOWNCASE (BUFFER_CASE_TABLE (buf)), c) | 1199 TRT_TABLE_OF (XCASE_TABLE_DOWNCASE (BUFFER_CASE_TABLE (buf)), c) |
1197 #define UPCASE_TABLE_OF(buf, c) \ | 1200 #define UPCASE_TABLE_OF(buf, c) \ |
1198 TRT_TABLE_OF (XCASE_TABLE_UPCASE (BUFFER_CASE_TABLE (buf)), c) | 1201 TRT_TABLE_OF (XCASE_TABLE_UPCASE (BUFFER_CASE_TABLE (buf)), c) |
1202 #define CANON_TABLE_OF(buf, c) \ | |
1203 TRT_TABLE_OF (XCASE_TABLE_CANON (BUFFER_CASE_TABLE (buf)), c) | |
1199 | 1204 |
1200 /* 1 if CH is upper case. */ | 1205 /* 1 if CH is upper case. */ |
1201 | 1206 |
1202 DECLARE_INLINE_HEADER ( | 1207 DECLARE_INLINE_HEADER ( |
1203 int | 1208 int |
1244 | 1249 |
1245 /* Downcase a character, or make no change if that cannot be done. */ | 1250 /* Downcase a character, or make no change if that cannot be done. */ |
1246 | 1251 |
1247 #define DOWNCASE(buf, ch) DOWNCASE_TABLE_OF (buf, ch) | 1252 #define DOWNCASE(buf, ch) DOWNCASE_TABLE_OF (buf, ch) |
1248 | 1253 |
1254 /* Convert a character to a canonical representation, so that case-independent | |
1255 comparisons will work. */ | |
1256 | |
1257 #define CANONCASE(buf, ch) CANON_TABLE_OF (buf, ch) | |
1258 | |
1249 #endif /* INCLUDED_buffer_h_ */ | 1259 #endif /* INCLUDED_buffer_h_ */ |