diff options
Diffstat (limited to 'src/xselect.c')
| -rw-r--r-- | src/xselect.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/xselect.c b/src/xselect.c index cc4eeed966e..a3ec3e40d0e 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -97,6 +97,8 @@ Lisp_Object QPRIMARY, QSECONDARY, QSTRING, QINTEGER, QCLIPBOARD, QTIMESTAMP, | |||
| 97 | 97 | ||
| 98 | Lisp_Object QCOMPOUND_TEXT; /* This is a type of selection. */ | 98 | Lisp_Object QCOMPOUND_TEXT; /* This is a type of selection. */ |
| 99 | 99 | ||
| 100 | Lisp_Object Qcompound_text_with_extensions; | ||
| 101 | |||
| 100 | #ifdef CUT_BUFFER_SUPPORT | 102 | #ifdef CUT_BUFFER_SUPPORT |
| 101 | Lisp_Object QCUT_BUFFER0, QCUT_BUFFER1, QCUT_BUFFER2, QCUT_BUFFER3, | 103 | Lisp_Object QCUT_BUFFER0, QCUT_BUFFER1, QCUT_BUFFER2, QCUT_BUFFER3, |
| 102 | QCUT_BUFFER4, QCUT_BUFFER5, QCUT_BUFFER6, QCUT_BUFFER7; | 104 | QCUT_BUFFER4, QCUT_BUFFER5, QCUT_BUFFER6, QCUT_BUFFER7; |
| @@ -1650,6 +1652,10 @@ selection_data_to_lisp_data (display, data, size, type, format) | |||
| 1650 | str = make_string_from_bytes ((char *) buf, | 1652 | str = make_string_from_bytes ((char *) buf, |
| 1651 | coding.produced_char, coding.produced); | 1653 | coding.produced_char, coding.produced); |
| 1652 | xfree (buf); | 1654 | xfree (buf); |
| 1655 | |||
| 1656 | if (SYMBOLP (coding.post_read_conversion) | ||
| 1657 | && !NILP (Ffboundp (coding.post_read_conversion))) | ||
| 1658 | str = run_pre_post_conversion_on_str (str, coding, 0); | ||
| 1653 | Vlast_coding_system_used = coding.symbol; | 1659 | Vlast_coding_system_used = coding.symbol; |
| 1654 | } | 1660 | } |
| 1655 | compose_chars_in_text (0, XSTRING (str)->size, str); | 1661 | compose_chars_in_text (0, XSTRING (str)->size, str); |
| @@ -1756,10 +1762,13 @@ lisp_data_to_selection_data (display, obj, | |||
| 1756 | Vnext_selection_coding_system = Vselection_coding_system; | 1762 | Vnext_selection_coding_system = Vselection_coding_system; |
| 1757 | 1763 | ||
| 1758 | *format_ret = 8; | 1764 | *format_ret = 8; |
| 1759 | *data_ret = x_encode_text (obj, Vnext_selection_coding_system, | 1765 | *data_ret = x_encode_text (obj, Vnext_selection_coding_system, 1, |
| 1760 | (int *) size_ret, &stringp); | 1766 | (int *) size_ret, &stringp); |
| 1761 | *nofree_ret = (*data_ret == XSTRING (obj)->data); | 1767 | *nofree_ret = (*data_ret == XSTRING (obj)->data); |
| 1762 | if (NILP (type)) | 1768 | if (EQ (Vnext_selection_coding_system, |
| 1769 | Qcompound_text_with_extensions)) | ||
| 1770 | type = QCOMPOUND_TEXT; | ||
| 1771 | else if (NILP (type)) | ||
| 1763 | type = (stringp ? QSTRING : QCOMPOUND_TEXT); | 1772 | type = (stringp ? QSTRING : QCOMPOUND_TEXT); |
| 1764 | Vlast_coding_system_used = (*nofree_ret | 1773 | Vlast_coding_system_used = (*nofree_ret |
| 1765 | ? Qraw_text | 1774 | ? Qraw_text |
| @@ -2426,6 +2435,8 @@ A value of 0 means wait as long as necessary. This is initialized from the | |||
| 2426 | QATOM = intern ("ATOM"); staticpro (&QATOM); | 2435 | QATOM = intern ("ATOM"); staticpro (&QATOM); |
| 2427 | QATOM_PAIR = intern ("ATOM_PAIR"); staticpro (&QATOM_PAIR); | 2436 | QATOM_PAIR = intern ("ATOM_PAIR"); staticpro (&QATOM_PAIR); |
| 2428 | QNULL = intern ("NULL"); staticpro (&QNULL); | 2437 | QNULL = intern ("NULL"); staticpro (&QNULL); |
| 2438 | Qcompound_text_with_extensions = intern ("compound-text-with-extensions"); | ||
| 2439 | staticpro (&Qcompound_text_with_extensions); | ||
| 2429 | 2440 | ||
| 2430 | #ifdef CUT_BUFFER_SUPPORT | 2441 | #ifdef CUT_BUFFER_SUPPORT |
| 2431 | QCUT_BUFFER0 = intern ("CUT_BUFFER0"); staticpro (&QCUT_BUFFER0); | 2442 | QCUT_BUFFER0 = intern ("CUT_BUFFER0"); staticpro (&QCUT_BUFFER0); |