Mercurial > emacs
changeset 30355:36c049a9730b
*** empty log message ***
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 21 Jul 2000 02:39:45 +0000 |
parents | 7540bd2b5a34 |
children | b600a31684db |
files | src/ChangeLog src/xfns.c src/xselect.c |
diffstat | 3 files changed, 27 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Fri Jul 21 02:32:21 2000 +0000 +++ b/src/ChangeLog Fri Jul 21 02:39:45 2000 +0000 @@ -1,3 +1,13 @@ +2000-07-21 Kenichi Handa <handa@etl.go.jp> + + * xfns.c (x_encode_text): New function. + (x_set_name): Use x_encode_text. + (x_set_title): Likewise. + + * xselect.c (lisp_data_to_selection_data): Use x_encode_text. + + * xterm.h (x_encode_text): Add prototype. + 2000-07-20 Dave Love <fx@gnu.org> * ccl.c (Fccl_execute_on_string): Don't check xmalloc return. Use
--- a/src/xfns.c Fri Jul 21 02:32:21 2000 +0000 +++ b/src/xfns.c Fri Jul 21 02:39:45 2000 +0000 @@ -2192,8 +2192,12 @@ { XTextProperty text, icon; int bytes, stringp; - - text.value = x_encode_text (name, Qcompound_text, &bytes, &stringp); + Lisp_Object coding_system; + + coding_system = Vlocale_coding_system; + if (NILP (coding_system)) + coding_system = Qcompound_text; + text.value = x_encode_text (name, coding_system, &bytes, &stringp); text.encoding = (stringp ? XA_STRING : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT); text.format = 8; @@ -2205,7 +2209,7 @@ } else { - icon.value = x_encode_text (f->icon_name, Qcompound_text, + icon.value = x_encode_text (f->icon_name, coding_system, &bytes, &stringp); icon.encoding = (stringp ? XA_STRING : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT); @@ -2295,8 +2299,12 @@ { XTextProperty text, icon; int bytes, stringp; - - text.value = x_encode_text (name, Qcompound_text, &bytes, &stringp); + Lisp_Object coding_system; + + coding_system = Vlocale_coding_system; + if (NILP (coding_system)) + coding_system = Qcompound_text; + text.value = x_encode_text (name, coding_system, &bytes, &stringp); text.encoding = (stringp ? XA_STRING : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT); text.format = 8; @@ -2308,7 +2316,7 @@ } else { - icon.value = x_encode_text (f->icon_name, Qcompound_text, + icon.value = x_encode_text (f->icon_name, coding_system, &bytes, &stringp); icon.encoding = (stringp ? XA_STRING : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
--- a/src/xselect.c Fri Jul 21 02:32:21 2000 +0000 +++ b/src/xselect.c Fri Jul 21 02:39:45 2000 +0000 @@ -1648,17 +1648,17 @@ { /* Since we are now handling multilingual text, we must consider sending back compound text. */ - int latin1_p; + int stringp; if (NILP (Vnext_selection_coding_system)) Vnext_selection_coding_system = Vselection_coding_system; *format_ret = 8; *data_ret = x_encode_text (obj, Vnext_selection_coding_system, - (int *) size_ret, &latin1_p); + (int *) size_ret, &stringp); *nofree_ret = (*data_ret == XSTRING (obj)->data); if (NILP (type)) - type = (latin1_p ? QSTRING : QCOMPOUND_TEXT); + type = (stringp ? QSTRING : QCOMPOUND_TEXT); Vlast_coding_system_used = (*nofree_ret ? Qraw_text : Vnext_selection_coding_system);