comparison src/casetab.c @ 424:11054d720c21 r21-2-20

Import from CVS: tag r21-2-20
author cvs
date Mon, 13 Aug 2007 11:26:11 +0200
parents 697ef44129c6
children
comparison
equal deleted inserted replaced
423:28d9c139be4c 424:11054d720c21
40 #include <config.h> 40 #include <config.h>
41 #include "lisp.h" 41 #include "lisp.h"
42 #include "buffer.h" 42 #include "buffer.h"
43 #include "opaque.h" 43 #include "opaque.h"
44 44
45 Lisp_Object Qcase_table_p; 45 Lisp_Object Qcase_tablep;
46 Lisp_Object Vascii_downcase_table, Vascii_upcase_table; 46 Lisp_Object Vascii_downcase_table, Vascii_upcase_table;
47 Lisp_Object Vascii_canon_table, Vascii_eqv_table; 47 Lisp_Object Vascii_canon_table, Vascii_eqv_table;
48 #ifdef MULE 48 #ifdef MULE
49 Lisp_Object Vmirror_ascii_downcase_table, Vmirror_ascii_upcase_table; 49 Lisp_Object Vmirror_ascii_downcase_table, Vmirror_ascii_upcase_table;
50 Lisp_Object Vmirror_ascii_canon_table, Vmirror_ascii_eqv_table; 50 Lisp_Object Vmirror_ascii_canon_table, Vmirror_ascii_eqv_table;
51 #endif 51 #endif
52 Lisp_Object Qtranslate_table;
53 52
54 static void compute_trt_inverse (Lisp_Object trt, Lisp_Object inverse); 53 static void compute_trt_inverse (Lisp_Object trt, Lisp_Object inverse);
55 54
56 #define STRING256_P(obj) (STRINGP (obj) && XSTRING_CHAR_LENGTH (obj) == 256) 55 #define STRING256_P(obj) (STRINGP (obj) && XSTRING_CHAR_LENGTH (obj) == 256)
57 56
79 check_case_table (Lisp_Object obj) 78 check_case_table (Lisp_Object obj)
80 { 79 {
81 REGISTER Lisp_Object tem; 80 REGISTER Lisp_Object tem;
82 81
83 while (tem = Fcase_table_p (obj), NILP (tem)) 82 while (tem = Fcase_table_p (obj), NILP (tem))
84 obj = wrong_type_argument (Qcase_table_p, obj); 83 obj = wrong_type_argument (Qcase_tablep, obj);
85 return (obj); 84 return (obj);
86 } 85 }
87 86
88 DEFUN ("current-case-table", Fcurrent_case_table, 0, 1, 0, /* 87 DEFUN ("current-case-table", Fcurrent_case_table, 0, 1, 0, /*
89 Return the case table of BUFFER, which defaults to the current buffer. 88 Return the case table of BUFFER, which defaults to the current buffer.
287 286
288 287
289 void 288 void
290 syms_of_casetab (void) 289 syms_of_casetab (void)
291 { 290 {
292 defsymbol (&Qcase_table_p, "case-table-p"); 291 defsymbol (&Qcase_tablep, "case-table-p");
293 defsymbol (&Qtranslate_table, "translate-table");
294 292
295 DEFSUBR (Fcase_table_p); 293 DEFSUBR (Fcase_table_p);
296 DEFSUBR (Fcurrent_case_table); 294 DEFSUBR (Fcurrent_case_table);
297 DEFSUBR (Fstandard_case_table); 295 DEFSUBR (Fstandard_case_table);
298 DEFSUBR (Fset_case_table); 296 DEFSUBR (Fset_case_table);
308 staticpro (&Vascii_downcase_table); 306 staticpro (&Vascii_downcase_table);
309 staticpro (&Vascii_upcase_table); 307 staticpro (&Vascii_upcase_table);
310 staticpro (&Vascii_canon_table); 308 staticpro (&Vascii_canon_table);
311 staticpro (&Vascii_eqv_table); 309 staticpro (&Vascii_eqv_table);
312 310
311 #ifdef MULE
312 staticpro (&Vmirror_ascii_downcase_table);
313 staticpro (&Vmirror_ascii_upcase_table);
314 staticpro (&Vmirror_ascii_canon_table);
315 staticpro (&Vmirror_ascii_eqv_table);
316 #endif
317
313 tem = MAKE_TRT_TABLE (); 318 tem = MAKE_TRT_TABLE ();
314 Vascii_downcase_table = tem; 319 Vascii_downcase_table = tem;
315 Vascii_canon_table = tem; 320 Vascii_canon_table = tem;
316 321
317 /* Under Mule, can't do set_string_char() until Vcharset_control_1 322 /* Under Mule, can't do set_string_char() until Vcharset_control_1