1757 |
/* Since we are now handling multilingual text, we must consider |
/* Since we are now handling multilingual text, we must consider |
1758 |
sending back compound text. */ |
sending back compound text. */ |
1759 |
int stringp; |
int stringp; |
1760 |
|
extern Lisp_Object Qcompound_text; |
1761 |
|
|
1762 |
if (NILP (Vnext_selection_coding_system)) |
if (NILP (Vnext_selection_coding_system)) |
1763 |
Vnext_selection_coding_system = Vselection_coding_system; |
Vnext_selection_coding_system = Vselection_coding_system; |
1764 |
|
|
1765 |
*format_ret = 8; |
*format_ret = 8; |
1766 |
*data_ret = x_encode_text (obj, Vnext_selection_coding_system, 1, |
/* If the requested type is STRING, we must encode the selected |
1767 |
(int *) size_ret, &stringp); |
text as a string, even if the coding system set by the user |
1768 |
*nofree_ret = (*data_ret == XSTRING (obj)->data); |
is ctext or its derivatives. */ |
1769 |
|
if (EQ (type, QSTRING) |
1770 |
|
&& (EQ (Vnext_selection_coding_system, Qcompound_text) |
1771 |
|
|| EQ (Vnext_selection_coding_system, |
1772 |
|
Qcompound_text_with_extensions))) |
1773 |
|
{ |
1774 |
|
Lisp_Object unibyte_string; |
1775 |
|
|
1776 |
|
unibyte_string = string_make_unibyte (obj); |
1777 |
|
*data_ret = XSTRING (unibyte_string)->data; |
1778 |
|
*nofree_ret = 1; |
1779 |
|
} |
1780 |
|
else |
1781 |
|
{ |
1782 |
|
*data_ret = x_encode_text (obj, Vnext_selection_coding_system, 1, |
1783 |
|
(int *) size_ret, &stringp); |
1784 |
|
*nofree_ret = (*data_ret == XSTRING (obj)->data); |
1785 |
|
} |
1786 |
if (NILP (type)) |
if (NILP (type)) |
1787 |
type = (stringp ? QSTRING : QCOMPOUND_TEXT); |
type = (stringp ? QSTRING : QCOMPOUND_TEXT); |
1788 |
Vlast_coding_system_used = (*nofree_ret |
Vlast_coding_system_used = (*nofree_ret |