Commit d24e26b1 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(selection_data_to_lisp_data): Code-convert selections

regardless of enable-multibyte-characters.
(lisp_data_to_selection_data): Likewise for decoding.
parent efa434d9
...@@ -1473,7 +1473,13 @@ selection_data_to_lisp_data (display, data, size, type, format) ...@@ -1473,7 +1473,13 @@ selection_data_to_lisp_data (display, data, size, type, format)
Lisp_Object str; Lisp_Object str;
int require_encoding = 0; int require_encoding = 0;
if (! NILP (buffer_defaults.enable_multibyte_characters)) if (
#if 1
1
#else
! NILP (buffer_defaults.enable_multibyte_characters)
#endif
)
{ {
/* If TYPE is `TEXT' or `COMPOUND_TEXT', we should decode /* If TYPE is `TEXT' or `COMPOUND_TEXT', we should decode
DATA to Emacs internal format because DATA may be encoded DATA to Emacs internal format because DATA may be encoded
...@@ -1628,7 +1634,8 @@ lisp_data_to_selection_data (display, obj, ...@@ -1628,7 +1634,8 @@ lisp_data_to_selection_data (display, obj,
*data_ret = XSTRING (obj)->data; *data_ret = XSTRING (obj)->data;
bzero (charsets, (MAX_CHARSET + 1) * sizeof (int)); bzero (charsets, (MAX_CHARSET + 1) * sizeof (int));
num = ((*size_ret <= 1 /* Check the possibility of short cut. */ num = ((*size_ret <= 1 /* Check the possibility of short cut. */
|| NILP (buffer_defaults.enable_multibyte_characters)) || !STRING_MULTIBYTE (obj)
|| *size_ret == XSTRING (obj)->size)
? 0 ? 0
: find_charset_in_str (*data_ret, *size_ret, charsets, Qnil, 1)); : find_charset_in_str (*data_ret, *size_ret, charsets, Qnil, 1));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment