diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 18 | ||||
| -rw-r--r-- | src/xselect.c | 15 |
2 files changed, 31 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9bd94125c7e..078a6178f7d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2002-02-22 Eli Zaretskii <eliz@is.elta.co.il> | ||
| 2 | |||
| 3 | Support for ICCCM Extended Segments in X selections: | ||
| 4 | |||
| 5 | * xselect.c <Qcompound_text_with_extensions>: New variable. | ||
| 6 | (syms_of_xselect): Intern and staticpro it. | ||
| 7 | (selection_data_to_lisp_data): Run post-read-conversion on decoded | ||
| 8 | selection text. | ||
| 9 | (lisp_data_to_selection_data): If next-selection-coding-system is | ||
| 10 | compound-text-with-extensions, set the type of selection to be | ||
| 11 | compound-text. | ||
| 12 | |||
| 13 | * xterm.h (x_encode_text): Update prototype. | ||
| 14 | |||
| 15 | * xfns.c (x_encode_text): Accept additional arg SELECTIONP; all | ||
| 16 | callers changed. If SELECTIONP is non-zero, run the | ||
| 17 | pre-write-conversion function before encoding the selection text. | ||
| 18 | |||
| 1 | 2002-02-21 Kim F. Storm <storm@cua.dk> | 19 | 2002-02-21 Kim F. Storm <storm@cua.dk> |
| 2 | 20 | ||
| 3 | * frame.c (syms_of_frame): Change mouse-highlight default to t. | 21 | * frame.c (syms_of_frame): Change mouse-highlight default to t. |
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); |