comparison src/charset.c @ 89787:cbb58e8c4481

(Vcharset_map_directory): Deleted. (Vcharset_map_path): New variable (load_charset_map_from_file): Use Vcharset_map_path instead. (init_charset): Initialize Vcharset_map_path. (syms_of_charset): Delete declaration of "charset-map-directory", add declaration of "charset-map-path".
author Kenichi Handa <handa@m17n.org>
date Fri, 30 Jan 2004 02:14:46 +0000
parents b07ce3d8fc4e
children c4c848b80f86
comparison
equal deleted inserted replaced
89786:cce22763e5b1 89787:cbb58e8c4481
108 108
109 /* Mapping table from ISO2022's charset (specified by DIMENSION, 109 /* Mapping table from ISO2022's charset (specified by DIMENSION,
110 CHARS, and FINAL-CHAR) to Emacs' charset. */ 110 CHARS, and FINAL-CHAR) to Emacs' charset. */
111 int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL]; 111 int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL];
112 112
113 Lisp_Object Vcharset_map_directory; 113 Lisp_Object Vcharset_map_path;
114 114
115 Lisp_Object Vchar_unified_charset_table; 115 Lisp_Object Vchar_unified_charset_table;
116 116
117 /* Defined in chartab.c */ 117 /* Defined in chartab.c */
118 extern void 118 extern void
404 int n_entries; 404 int n_entries;
405 405
406 suffixes = Fcons (build_string (".map"), 406 suffixes = Fcons (build_string (".map"),
407 Fcons (build_string (".TXT"), Qnil)); 407 Fcons (build_string (".TXT"), Qnil));
408 408
409 fd = openp (Fcons (Vcharset_map_directory, Qnil), mapfile, suffixes, 409 fd = openp (Vcharset_map_path, mapfile, suffixes, NULL, Qnil);
410 NULL, Qnil);
411 if (fd < 0 410 if (fd < 0
412 || ! (fp = fdopen (fd, "r"))) 411 || ! (fp = fdopen (fd, "r")))
413 { 412 {
414 add_to_log ("Failure in loading charset map: %S", mapfile, Qnil); 413 add_to_log ("Failure in loading charset map: %S", mapfile, Qnil);
415 return; 414 return;
2037 2036
2038 2037
2039 void 2038 void
2040 init_charset () 2039 init_charset ()
2041 { 2040 {
2042 2041 Vcharset_map_path
2042 = Fcons (Fexpand_file_name (build_string ("charsets"), Vdata_directory),
2043 Qnil);
2043 } 2044 }
2044 2045
2045 2046
2046 void 2047 void
2047 init_charset_once () 2048 init_charset_once ()
2129 defsubr (&Sclear_charset_maps); 2130 defsubr (&Sclear_charset_maps);
2130 defsubr (&Scharset_priority_list); 2131 defsubr (&Scharset_priority_list);
2131 defsubr (&Sset_charset_priority); 2132 defsubr (&Sset_charset_priority);
2132 defsubr (&Scharset_id_internal); 2133 defsubr (&Scharset_id_internal);
2133 2134
2134 DEFVAR_LISP ("charset-map-directory", &Vcharset_map_directory, 2135 DEFVAR_LISP ("charset-map-path", &Vcharset_map_path,
2135 doc: /* Directory of charset map files that come with GNU Emacs. 2136 doc: /* *Lisp of directories to search for charset map files. */);
2136 The default value is sub-directory "charsets" of `data-directory'. */); 2137 Vcharset_map_path = Qnil;
2137 Vcharset_map_directory = Fexpand_file_name (build_string ("charsets"),
2138 Vdata_directory);
2139 2138
2140 DEFVAR_LISP ("charset-list", &Vcharset_list, 2139 DEFVAR_LISP ("charset-list", &Vcharset_list,
2141 doc: /* List of all charsets ever defined. */); 2140 doc: /* List of all charsets ever defined. */);
2142 Vcharset_list = Qnil; 2141 Vcharset_list = Qnil;
2143 2142