diff options
| author | Richard M. Stallman | 1998-08-26 21:15:23 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-08-26 21:15:23 +0000 |
| commit | d24e26b1a9ecd3d10613b3fa78a0abe065554035 (patch) | |
| tree | 2a2aff6bb9b25d10f893f5f136baed146a510c48 /src | |
| parent | efa434d9f2720aa71fbc67fed5897a2f16943fde (diff) | |
| download | emacs-d24e26b1a9ecd3d10613b3fa78a0abe065554035.tar.gz emacs-d24e26b1a9ecd3d10613b3fa78a0abe065554035.zip | |
(selection_data_to_lisp_data): Code-convert selections
regardless of enable-multibyte-characters.
(lisp_data_to_selection_data): Likewise for decoding.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xselect.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/xselect.c b/src/xselect.c index 74f0393d1fd..d9da5edc3fa 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -1473,7 +1473,13 @@ selection_data_to_lisp_data (display, data, size, type, format) | |||
| 1473 | Lisp_Object str; | 1473 | Lisp_Object str; |
| 1474 | int require_encoding = 0; | 1474 | int require_encoding = 0; |
| 1475 | 1475 | ||
| 1476 | if (! NILP (buffer_defaults.enable_multibyte_characters)) | 1476 | if ( |
| 1477 | #if 1 | ||
| 1478 | 1 | ||
| 1479 | #else | ||
| 1480 | ! NILP (buffer_defaults.enable_multibyte_characters) | ||
| 1481 | #endif | ||
| 1482 | ) | ||
| 1477 | { | 1483 | { |
| 1478 | /* If TYPE is `TEXT' or `COMPOUND_TEXT', we should decode | 1484 | /* If TYPE is `TEXT' or `COMPOUND_TEXT', we should decode |
| 1479 | DATA to Emacs internal format because DATA may be encoded | 1485 | DATA to Emacs internal format because DATA may be encoded |
| @@ -1628,7 +1634,8 @@ lisp_data_to_selection_data (display, obj, | |||
| 1628 | *data_ret = XSTRING (obj)->data; | 1634 | *data_ret = XSTRING (obj)->data; |
| 1629 | bzero (charsets, (MAX_CHARSET + 1) * sizeof (int)); | 1635 | bzero (charsets, (MAX_CHARSET + 1) * sizeof (int)); |
| 1630 | num = ((*size_ret <= 1 /* Check the possibility of short cut. */ | 1636 | num = ((*size_ret <= 1 /* Check the possibility of short cut. */ |
| 1631 | || NILP (buffer_defaults.enable_multibyte_characters)) | 1637 | || !STRING_MULTIBYTE (obj) |
| 1638 | || *size_ret == XSTRING (obj)->size) | ||
| 1632 | ? 0 | 1639 | ? 0 |
| 1633 | : find_charset_in_str (*data_ret, *size_ret, charsets, Qnil, 1)); | 1640 | : find_charset_in_str (*data_ret, *size_ret, charsets, Qnil, 1)); |
| 1634 | 1641 | ||