Commit 6809ca75 authored by Kenichi Handa's avatar Kenichi Handa

(Fset_charset_priority): Update charset_unibyte.

(syms_of_charset): Initialize charset_unibyte.
parent f78d01e0
2009-07-07 Kenichi Handa <handa@m17n.org>
* character.h (unibyte_has_multibyte_table): Delete extern.
(UNIBYTE_CHAR_HAS_MULTIBYTE_P): Delete it.
* charset.c (Fset_charset_priority): Update charset_unibyte.
(syms_of_charset): Initialize charset_unibyte.
* character.c (unibyte_has_multibyte_table): Delete it.
(multibyte_char_to_unibyte): Use CHAR_TO_BYTE8 instead of checking
charset_unibyte.
(multibyte_char_to_unibyte_safe): Likewise.
(Funibyte_char_to_multibyte): Don't check charset_unibyte.
* xdisp.c (get_next_display_element): Decode it->c by
charset_unibyte.
(x_produce_glyphs): Likewise.
* .gdbinit (xcharset): Fix the treating $arg0.
2009-07-04 Eli Zaretskii <eliz@gnu.org>
Emulation of `getloadavg' on MS-Windows.
......
......@@ -1798,7 +1798,7 @@ encode_char (charset, c)
if (CHARSET_UNIFIED_P (charset))
{
Lisp_Object deunifier, deunified;
Lisp_Object deunifier;
int code_index = -1;
deunifier = CHARSET_DEUNIFIER (charset);
......@@ -2196,10 +2196,6 @@ Clear temporary charset mapping tables.
It should be called only from temacs invoked for dumping. */)
()
{
int i;
struct charset *charset;
Lisp_Object attrs;
if (temp_charset_work)
{
free (temp_charset_work);
......@@ -2260,6 +2256,7 @@ usage: (set-charset-priority &rest charsets) */)
Vcharset_ordered_list = Fnconc (2, arglist);
charset_ordered_list_tick++;
charset_unibyte = -1;
for (old_list = Vcharset_ordered_list, list_2022 = list_emacs_mule = Qnil;
CONSP (old_list); old_list = XCDR (old_list))
{
......@@ -2267,9 +2264,20 @@ usage: (set-charset-priority &rest charsets) */)
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);
if (charset_unibyte < 0)
{
struct charset *charset = CHARSET_FROM_ID (XINT (XCAR (old_list)));
if (CHARSET_DIMENSION (charset) == 1
&& CHARSET_ASCII_COMPATIBLE_P (charset)
&& CHARSET_MAX_CHAR (charset) >= 0x80)
charset_unibyte = CHARSET_ID (charset);
}
}
Viso_2022_charset_list = Fnreverse (list_2022);
Vemacs_mule_charset_list = Fnreverse (list_emacs_mule);
if (charset_unibyte < 0)
charset_unibyte = charset_iso_8859_1;
return Qnil;
}
......@@ -2293,7 +2301,7 @@ init_charset ()
{
Lisp_Object tempdir;
tempdir = Fexpand_file_name (build_string ("charsets"), Vdata_directory);
if (access (SDATA (tempdir), 0) < 0)
if (access ((char *) SDATA (tempdir), 0) < 0)
{
dir_warning ("Error: charsets directory (%s) does not exist.\n\
Emacs will not function correctly without the character map files.\n\
......@@ -2429,6 +2437,7 @@ the value may be a list of mnemonics. */);
= define_charset_internal (Qeight_bit, 1, "\x80\xFF\x00\x00\x00\x00",
128, 255, -1, 0, -1, 0, 1,
MAX_5_BYTE_CHAR + 1);
charset_unibyte = charset_iso_8859_1;
}
#endif /* emacs */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment