From e8bd4b948b82fd47359e0cf9a0a9ebb802c01e78 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 17 Jul 2014 18:37:48 +0300 Subject: [PATCH] Fix setting up coding-systems for clipboard access on MS-Windows and MS-DOS. src/w32select.c (setup_windows_coding_system): Apply CODING_ANNOTATION_MASK to the common_flags member of struct coding_system. Reported by Martin Rudalics . src/w16select.c (Fw16_get_clipboard_data): Apply CODING_ANNOTATION_MASK to the common_flags member of struct coding_system. --- src/ChangeLog | 9 +++++++++ src/w16select.c | 2 +- src/w32select.c | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 737a5078b24..d395e97246d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,14 @@ 2014-07-17 Eli Zaretskii + * w32select.c (setup_windows_coding_system): Apply + CODING_ANNOTATION_MASK to the common_flags member of struct + coding_system. Reported by martin rudalics . + + * w16select.c (Fw16_get_clipboard_data): Apply + CODING_ANNOTATION_MASK to the common_flags member of struct + coding_system. + + * xdisp.c (init_iterator): Initialize it->stop_charpos to the buffer position where we are to start the iteration. (handle_invisible_prop): Record in it->stop_charpos the position diff --git a/src/w16select.c b/src/w16select.c index 1e4d35b721b..4f88741f5c1 100644 --- a/src/w16select.c +++ b/src/w16select.c @@ -600,7 +600,7 @@ DEFUN ("w16-get-clipboard-data", Fw16_get_clipboard_data, Sw16_get_clipboard_dat coding.mode |= CODING_MODE_LAST_BLOCK; /* We explicitly disable composition handling because selection data should not contain any composition sequence. */ - coding.mode &= CODING_ANNOTATION_MASK; + coding.common_flags &= CODING_ANNOTATION_MASK; decode_coding_object (&coding, Qnil, 0, 0, truelen, truelen, Qt); ret = coding.dst_object; Vlast_coding_system_used = CODING_ID_NAME (coding.id); diff --git a/src/w32select.c b/src/w32select.c index 2ae25858bd2..7c21dde01a5 100644 --- a/src/w32select.c +++ b/src/w32select.c @@ -670,7 +670,7 @@ setup_windows_coding_system (Lisp_Object coding_system, which both apply to ISO6429 only. We don't know if these really need to be unset on Windows, but it probably doesn't hurt either. */ - coding->mode &= ~CODING_ANNOTATION_MASK; + coding->common_flags &= ~CODING_ANNOTATION_MASK; coding->mode |= CODING_MODE_LAST_BLOCK | CODING_MODE_SAFE_ENCODING; } -- 2.39.5