Commit 11270583 authored by Kenichi Handa's avatar Kenichi Handa
Browse files

*** empty log message ***

parent d60660d6
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> 2000-07-20 Dave Love <fx@gnu.org>
   
* ccl.c (Fccl_execute_on_string): Don't check xmalloc return. Use * ccl.c (Fccl_execute_on_string): Don't check xmalloc return. Use
......
...@@ -2192,8 +2192,12 @@ x_set_name (f, name, explicit) ...@@ -2192,8 +2192,12 @@ x_set_name (f, name, explicit)
{ {
XTextProperty text, icon; XTextProperty text, icon;
int bytes, stringp; int bytes, stringp;
Lisp_Object coding_system;
text.value = x_encode_text (name, Qcompound_text, &bytes, &stringp); 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 text.encoding = (stringp ? XA_STRING
: FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT); : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
text.format = 8; text.format = 8;
...@@ -2205,7 +2209,7 @@ x_set_name (f, name, explicit) ...@@ -2205,7 +2209,7 @@ x_set_name (f, name, explicit)
} }
else else
{ {
icon.value = x_encode_text (f->icon_name, Qcompound_text, icon.value = x_encode_text (f->icon_name, coding_system,
&bytes, &stringp); &bytes, &stringp);
icon.encoding = (stringp ? XA_STRING icon.encoding = (stringp ? XA_STRING
: FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT); : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
...@@ -2295,8 +2299,12 @@ x_set_title (f, name, old_name) ...@@ -2295,8 +2299,12 @@ x_set_title (f, name, old_name)
{ {
XTextProperty text, icon; XTextProperty text, icon;
int bytes, stringp; int bytes, stringp;
Lisp_Object coding_system;
text.value = x_encode_text (name, Qcompound_text, &bytes, &stringp); 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 text.encoding = (stringp ? XA_STRING
: FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT); : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
text.format = 8; text.format = 8;
...@@ -2308,7 +2316,7 @@ x_set_title (f, name, old_name) ...@@ -2308,7 +2316,7 @@ x_set_title (f, name, old_name)
} }
else else
{ {
icon.value = x_encode_text (f->icon_name, Qcompound_text, icon.value = x_encode_text (f->icon_name, coding_system,
&bytes, &stringp); &bytes, &stringp);
icon.encoding = (stringp ? XA_STRING icon.encoding = (stringp ? XA_STRING
: FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT); : FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
......
...@@ -1648,17 +1648,17 @@ lisp_data_to_selection_data (display, obj, ...@@ -1648,17 +1648,17 @@ lisp_data_to_selection_data (display, obj,
{ {
/* Since we are now handling multilingual text, we must consider /* Since we are now handling multilingual text, we must consider
sending back compound text. */ sending back compound text. */
int latin1_p; int stringp;
if (NILP (Vnext_selection_coding_system)) if (NILP (Vnext_selection_coding_system))
Vnext_selection_coding_system = Vselection_coding_system; Vnext_selection_coding_system = Vselection_coding_system;
*format_ret = 8; *format_ret = 8;
*data_ret = x_encode_text (obj, Vnext_selection_coding_system, *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); *nofree_ret = (*data_ret == XSTRING (obj)->data);
if (NILP (type)) if (NILP (type))
type = (latin1_p ? QSTRING : QCOMPOUND_TEXT); type = (stringp ? QSTRING : QCOMPOUND_TEXT);
Vlast_coding_system_used = (*nofree_ret Vlast_coding_system_used = (*nofree_ret
? Qraw_text ? Qraw_text
: Vnext_selection_coding_system); : Vnext_selection_coding_system);
......
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