struct charset *charset_table;
static int charset_table_size;
-int charset_table_used;
+static int charset_table_used;
Lisp_Object Qcharsetp;
CHARS, and FINAL-CHAR) to Emacs' charset. */
int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL];
-Lisp_Object Vcharset_map_directory;
+Lisp_Object Vcharset_map_path;
Lisp_Object Vchar_unified_charset_table;
suffixes = Fcons (build_string (".map"),
Fcons (build_string (".TXT"), Qnil));
- fd = openp (Fcons (Vcharset_map_directory, Qnil), mapfile, suffixes,
- NULL, Qnil);
+ fd = openp (Vcharset_map_path, mapfile, suffixes, NULL, Qnil);
if (fd < 0
|| ! (fp = fdopen (fd, "r")))
{
range = Fcons (make_number (from_c), make_number (to_c));
if (NILP (function))
- (*c_function) (range, arg);
+ (*c_function) (arg, range);
else
call2 (function, range, arg);
}
XSETCAR (range, make_number (127));
if (NILP (function))
- (*c_function) (range, arg);
+ (*c_function) (arg, range);
else
call2 (function, range, arg);
}
this_from = CHARSET_MIN_CODE (charset);
if (this_to > CHARSET_MAX_CODE (charset))
this_to = CHARSET_MAX_CODE (charset);
- map_charset_chars (c_function, function, arg, charset, from, to);
+ map_charset_chars (c_function, function, arg, charset,
+ this_from, this_to);
}
}
}
int multibyte;
{
const unsigned char *pend = ptr + nbytes;
- int ncharsets = ASIZE (charsets);
if (nchars == nbytes)
{
Lisp_Object *args;
{
Lisp_Object new_head, old_list, arglist[2];
+ Lisp_Object list_2022, list_emacs_mule;
int i, id;
old_list = Fcopy_sequence (Vcharset_ordered_list);
Vcharset_ordered_list = Fnconc (2, arglist);
charset_ordered_list_tick++;
- for (old_list = Vcharset_ordered_list, new_head = Qnil;
+ for (old_list = Vcharset_ordered_list, list_2022 = list_emacs_mule = Qnil;
CONSP (old_list); old_list = XCDR (old_list))
{
if (! NILP (Fmemq (XCAR (old_list), Viso_2022_charset_list)))
- new_head = Fcons (XCAR (old_list), new_head);
+ list_2022 = Fcons (XCAR (old_list), list_2022);
+ if (! NILP (Fmemq (XCAR (old_list), Vemacs_mule_charset_list)))
+ list_emacs_mule = Fcons (XCAR (old_list), list_emacs_mule);
}
- Viso_2022_charset_list = Fnreverse (new_head);
+ Viso_2022_charset_list = Fnreverse (list_2022);
+ Vemacs_mule_charset_list = Fnreverse (list_emacs_mule);
return Qnil;
}
void
init_charset ()
{
-
+ Vcharset_map_path
+ = Fcons (Fexpand_file_name (build_string ("charsets"), Vdata_directory),
+ Qnil);
}
defsubr (&Sset_charset_priority);
defsubr (&Scharset_id_internal);
- DEFVAR_LISP ("charset-map-directory", &Vcharset_map_directory,
- doc: /* Directory of charset map files that come with GNU Emacs.
-The default value is sub-directory "charsets" of `data-directory'. */);
- Vcharset_map_directory = Fexpand_file_name (build_string ("charsets"),
- Vdata_directory);
+ DEFVAR_LISP ("charset-map-path", &Vcharset_map_path,
+ doc: /* *Lisp of directories to search for charset map files. */);
+ Vcharset_map_path = Qnil;
DEFVAR_LISP ("charset-list", &Vcharset_list,
doc: /* List of all charsets ever defined. */);