aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2009-07-07 06:27:23 +0000
committerKenichi Handa2009-07-07 06:27:23 +0000
commit6809ca75357057d1068e3a687b320d00d12322e4 (patch)
tree63af7cd2bbef5a850019c39a612978f8b0f0fe2c /src
parentf78d01e09e166d1581dc97a0fd148a8907686331 (diff)
downloademacs-6809ca75357057d1068e3a687b320d00d12322e4.tar.gz
emacs-6809ca75357057d1068e3a687b320d00d12322e4.zip
(Fset_charset_priority): Update charset_unibyte.
(syms_of_charset): Initialize charset_unibyte.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog20
-rw-r--r--src/charset.c21
2 files changed, 35 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9da5a0871bd..3a57c0a6223 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,23 @@
12009-07-07 Kenichi Handa <handa@m17n.org>
2
3 * character.h (unibyte_has_multibyte_table): Delete extern.
4 (UNIBYTE_CHAR_HAS_MULTIBYTE_P): Delete it.
5
6 * charset.c (Fset_charset_priority): Update charset_unibyte.
7 (syms_of_charset): Initialize charset_unibyte.
8
9 * character.c (unibyte_has_multibyte_table): Delete it.
10 (multibyte_char_to_unibyte): Use CHAR_TO_BYTE8 instead of checking
11 charset_unibyte.
12 (multibyte_char_to_unibyte_safe): Likewise.
13 (Funibyte_char_to_multibyte): Don't check charset_unibyte.
14
15 * xdisp.c (get_next_display_element): Decode it->c by
16 charset_unibyte.
17 (x_produce_glyphs): Likewise.
18
19 * .gdbinit (xcharset): Fix the treating $arg0.
20
12009-07-04 Eli Zaretskii <eliz@gnu.org> 212009-07-04 Eli Zaretskii <eliz@gnu.org>
2 22
3 Emulation of `getloadavg' on MS-Windows. 23 Emulation of `getloadavg' on MS-Windows.
diff --git a/src/charset.c b/src/charset.c
index 6674861f133..e4195de9ff2 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1798,7 +1798,7 @@ encode_char (charset, c)
1798 1798
1799 if (CHARSET_UNIFIED_P (charset)) 1799 if (CHARSET_UNIFIED_P (charset))
1800 { 1800 {
1801 Lisp_Object deunifier, deunified; 1801 Lisp_Object deunifier;
1802 int code_index = -1; 1802 int code_index = -1;
1803 1803
1804 deunifier = CHARSET_DEUNIFIER (charset); 1804 deunifier = CHARSET_DEUNIFIER (charset);
@@ -2196,10 +2196,6 @@ Clear temporary charset mapping tables.
2196It should be called only from temacs invoked for dumping. */) 2196It should be called only from temacs invoked for dumping. */)
2197 () 2197 ()
2198{ 2198{
2199 int i;
2200 struct charset *charset;
2201 Lisp_Object attrs;
2202
2203 if (temp_charset_work) 2199 if (temp_charset_work)
2204 { 2200 {
2205 free (temp_charset_work); 2201 free (temp_charset_work);
@@ -2260,6 +2256,7 @@ usage: (set-charset-priority &rest charsets) */)
2260 Vcharset_ordered_list = Fnconc (2, arglist); 2256 Vcharset_ordered_list = Fnconc (2, arglist);
2261 charset_ordered_list_tick++; 2257 charset_ordered_list_tick++;
2262 2258
2259 charset_unibyte = -1;
2263 for (old_list = Vcharset_ordered_list, list_2022 = list_emacs_mule = Qnil; 2260 for (old_list = Vcharset_ordered_list, list_2022 = list_emacs_mule = Qnil;
2264 CONSP (old_list); old_list = XCDR (old_list)) 2261 CONSP (old_list); old_list = XCDR (old_list))
2265 { 2262 {
@@ -2267,9 +2264,20 @@ usage: (set-charset-priority &rest charsets) */)
2267 list_2022 = Fcons (XCAR (old_list), list_2022); 2264 list_2022 = Fcons (XCAR (old_list), list_2022);
2268 if (! NILP (Fmemq (XCAR (old_list), Vemacs_mule_charset_list))) 2265 if (! NILP (Fmemq (XCAR (old_list), Vemacs_mule_charset_list)))
2269 list_emacs_mule = Fcons (XCAR (old_list), list_emacs_mule); 2266 list_emacs_mule = Fcons (XCAR (old_list), list_emacs_mule);
2267 if (charset_unibyte < 0)
2268 {
2269 struct charset *charset = CHARSET_FROM_ID (XINT (XCAR (old_list)));
2270
2271 if (CHARSET_DIMENSION (charset) == 1
2272 && CHARSET_ASCII_COMPATIBLE_P (charset)
2273 && CHARSET_MAX_CHAR (charset) >= 0x80)
2274 charset_unibyte = CHARSET_ID (charset);
2275 }
2270 } 2276 }
2271 Viso_2022_charset_list = Fnreverse (list_2022); 2277 Viso_2022_charset_list = Fnreverse (list_2022);
2272 Vemacs_mule_charset_list = Fnreverse (list_emacs_mule); 2278 Vemacs_mule_charset_list = Fnreverse (list_emacs_mule);
2279 if (charset_unibyte < 0)
2280 charset_unibyte = charset_iso_8859_1;
2273 2281
2274 return Qnil; 2282 return Qnil;
2275} 2283}
@@ -2293,7 +2301,7 @@ init_charset ()
2293{ 2301{
2294 Lisp_Object tempdir; 2302 Lisp_Object tempdir;
2295 tempdir = Fexpand_file_name (build_string ("charsets"), Vdata_directory); 2303 tempdir = Fexpand_file_name (build_string ("charsets"), Vdata_directory);
2296 if (access (SDATA (tempdir), 0) < 0) 2304 if (access ((char *) SDATA (tempdir), 0) < 0)
2297 { 2305 {
2298 dir_warning ("Error: charsets directory (%s) does not exist.\n\ 2306 dir_warning ("Error: charsets directory (%s) does not exist.\n\
2299Emacs will not function correctly without the character map files.\n\ 2307Emacs will not function correctly without the character map files.\n\
@@ -2429,6 +2437,7 @@ the value may be a list of mnemonics. */);
2429 = define_charset_internal (Qeight_bit, 1, "\x80\xFF\x00\x00\x00\x00", 2437 = define_charset_internal (Qeight_bit, 1, "\x80\xFF\x00\x00\x00\x00",
2430 128, 255, -1, 0, -1, 0, 1, 2438 128, 255, -1, 0, -1, 0, 1,
2431 MAX_5_BYTE_CHAR + 1); 2439 MAX_5_BYTE_CHAR + 1);
2440 charset_unibyte = charset_iso_8859_1;
2432} 2441}
2433 2442
2434#endif /* emacs */ 2443#endif /* emacs */