summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2000-07-21 02:39:45 +0000
committerKenichi Handa <handa@m17n.org>2000-07-21 02:39:45 +0000
commit11270583fe28b5af6b2c19862af597e8d676783d (patch)
tree03e8518728e2fa1610db9cac268aa923b0a42c67
parentd60660d6e9121bd2fc5184a5e9fea6a5d98dc39d (diff)
downloademacs-11270583fe28b5af6b2c19862af597e8d676783d.tar.gz
*** empty log message ***
-rw-r--r--src/ChangeLog10
-rw-r--r--src/xfns.c16
-rw-r--r--src/xselect.c6
3 files changed, 25 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9cfe1c40e59..c3ca88eb9e7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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
diff --git a/src/xfns.c b/src/xfns.c
index eb72cddfc65..4b8264aaa71 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2192,8 +2192,12 @@ x_set_name (f, name, explicit)
{
XTextProperty text, icon;
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
: FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
text.format = 8;
@@ -2205,7 +2209,7 @@ x_set_name (f, name, explicit)
}
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 @@ x_set_title (f, name, old_name)
{
XTextProperty text, icon;
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
: FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
text.format = 8;
@@ -2308,7 +2316,7 @@ x_set_title (f, name, old_name)
}
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);
diff --git a/src/xselect.c b/src/xselect.c
index dba8289ccda..ac260160781 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1648,17 +1648,17 @@ lisp_data_to_selection_data (display, obj,
{
/* 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);