diff options
| author | Eli Zaretskii | 2002-05-07 05:46:35 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2002-05-07 05:46:35 +0000 |
| commit | 7b9ae523c5a3dca44fbaf64920062b236cc50e50 (patch) | |
| tree | ca7cd430ead7948cc3075a7560e50ba180895e19 /src | |
| parent | ef93458b2f8ae0e15c8e85656d68e22bb4f230b3 (diff) | |
| download | emacs-7b9ae523c5a3dca44fbaf64920062b236cc50e50.tar.gz emacs-7b9ae523c5a3dca44fbaf64920062b236cc50e50.zip | |
(lisp_data_to_selection_data): Don't set selection
type if comes from the Lisp object's car. If the selection
contains a pure ASCII text, always return QSTRING as its type.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xselect.c | 15 |
2 files changed, 16 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4f37ed65ac7..d8c725c7333 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2002-05-07 Eli Zaretskii <eliz@is.elta.co.il> | ||
| 2 | |||
| 3 | * xselect.c (lisp_data_to_selection_data): Don't set selection | ||
| 4 | type if comes from the Lisp object's car. If the selection | ||
| 5 | contains a pure ASCII text, always return QSTRING as its type. | ||
| 6 | |||
| 1 | 2002-05-06 Pavel Jan,Bm(Bk <Pavel@Janik.cz> | 7 | 2002-05-06 Pavel Jan,Bm(Bk <Pavel@Janik.cz> |
| 2 | 8 | ||
| 3 | * mac.c (mac-cut-function): Doc fix. | 9 | * mac.c (mac-cut-function): Doc fix. |
diff --git a/src/xselect.c b/src/xselect.c index 03580b782fe..c95cc211c1d 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -1765,11 +1765,16 @@ lisp_data_to_selection_data (display, obj, | |||
| 1765 | *data_ret = x_encode_text (obj, Vnext_selection_coding_system, 1, | 1765 | *data_ret = x_encode_text (obj, Vnext_selection_coding_system, 1, |
| 1766 | (int *) size_ret, &stringp); | 1766 | (int *) size_ret, &stringp); |
| 1767 | *nofree_ret = (*data_ret == XSTRING (obj)->data); | 1767 | *nofree_ret = (*data_ret == XSTRING (obj)->data); |
| 1768 | if (EQ (Vnext_selection_coding_system, | 1768 | if (NILP (type)) |
| 1769 | Qcompound_text_with_extensions)) | 1769 | { |
| 1770 | type = QCOMPOUND_TEXT; | 1770 | if (stringp && *nofree_ret) |
| 1771 | else if (NILP (type)) | 1771 | type = QSTRING; |
| 1772 | type = (stringp ? QSTRING : QCOMPOUND_TEXT); | 1772 | else if (EQ (Vnext_selection_coding_system, |
| 1773 | Qcompound_text_with_extensions)) | ||
| 1774 | type = QCOMPOUND_TEXT; | ||
| 1775 | else | ||
| 1776 | type = (stringp ? QSTRING : QCOMPOUND_TEXT); | ||
| 1777 | } | ||
| 1773 | Vlast_coding_system_used = (*nofree_ret | 1778 | Vlast_coding_system_used = (*nofree_ret |
| 1774 | ? Qraw_text | 1779 | ? Qraw_text |
| 1775 | : Vnext_selection_coding_system); | 1780 | : Vnext_selection_coding_system); |