diff options
| author | Kenichi Handa | 1998-07-09 02:02:33 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-07-09 02:02:33 +0000 |
| commit | 061bda8dfd24c7f4c6396941d4352264c543613e (patch) | |
| tree | 58d677fe4b92f3dd623451c10da7e00f89b6a781 /src | |
| parent | 4e8b7ae5c1690718c8b5d7b67ed17d367d89f690 (diff) | |
| download | emacs-061bda8dfd24c7f4c6396941d4352264c543613e.tar.gz emacs-061bda8dfd24c7f4c6396941d4352264c543613e.zip | |
(selection_data_to_lisp_data): Set Vlast_coding_system_used.
(lisp_data_to_selection_data): Likewize.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xselect.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/xselect.c b/src/xselect.c index 969fd4e4148..713db184ef8 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -1494,7 +1494,10 @@ selection_data_to_lisp_data (display, data, size, type, format) | |||
| 1494 | } | 1494 | } |
| 1495 | } | 1495 | } |
| 1496 | if (!require_encoding) | 1496 | if (!require_encoding) |
| 1497 | str = make_unibyte_string ((char *) data, size); | 1497 | { |
| 1498 | str = make_unibyte_string ((char *) data, size); | ||
| 1499 | Vlast_coding_system_used = Qraw_text; | ||
| 1500 | } | ||
| 1498 | else | 1501 | else |
| 1499 | { | 1502 | { |
| 1500 | int bufsize; | 1503 | int bufsize; |
| @@ -1512,6 +1515,7 @@ selection_data_to_lisp_data (display, data, size, type, format) | |||
| 1512 | : coding.produced_char); | 1515 | : coding.produced_char); |
| 1513 | str = make_string_from_bytes ((char *) buf, size, coding.produced); | 1516 | str = make_string_from_bytes ((char *) buf, size, coding.produced); |
| 1514 | xfree (buf); | 1517 | xfree (buf); |
| 1518 | Vlast_coding_system_used = coding.symbol; | ||
| 1515 | } | 1519 | } |
| 1516 | return str; | 1520 | return str; |
| 1517 | } | 1521 | } |
| @@ -1627,6 +1631,7 @@ lisp_data_to_selection_data (display, obj, | |||
| 1627 | /* No multibyte character in OBJ. We need not encode it. */ | 1631 | /* No multibyte character in OBJ. We need not encode it. */ |
| 1628 | *nofree_ret = 1; | 1632 | *nofree_ret = 1; |
| 1629 | if (NILP (type)) type = QSTRING; | 1633 | if (NILP (type)) type = QSTRING; |
| 1634 | Vlast_coding_system_used = Qraw_text; | ||
| 1630 | } | 1635 | } |
| 1631 | else | 1636 | else |
| 1632 | { | 1637 | { |
| @@ -1657,6 +1662,7 @@ lisp_data_to_selection_data (display, obj, | |||
| 1657 | /* We must return it as `COMPOUND_TEXT'. */ | 1662 | /* We must return it as `COMPOUND_TEXT'. */ |
| 1658 | if (NILP (type)) type = QCOMPOUND_TEXT; | 1663 | if (NILP (type)) type = QCOMPOUND_TEXT; |
| 1659 | } | 1664 | } |
| 1665 | Vlast_coding_system_used = coding.symbol; | ||
| 1660 | } | 1666 | } |
| 1661 | } | 1667 | } |
| 1662 | else if (SYMBOLP (obj)) | 1668 | else if (SYMBOLP (obj)) |