summaryrefslogtreecommitdiff
path: root/lisp/select.el
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-12-17 07:56:22 -0700
committerTom Tromey <tromey@redhat.com>2012-12-17 07:56:22 -0700
commit3d6eced1ae51ffd0a782130e7c334052277e2724 (patch)
tree5d1d2ad7cd3374f922886c4a72062511a035c168 /lisp/select.el
parentbf69f522a9e135f9aa483cedd53e71e915f2bf75 (diff)
parent7c3d167f48d6262ee4e5512aa50a07ee96bc1509 (diff)
downloademacs-3d6eced1ae51ffd0a782130e7c334052277e2724.tar.gz
merge from trunk
Diffstat (limited to 'lisp/select.el')
-rw-r--r--lisp/select.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/select.el b/lisp/select.el
index d3153a0ce0e..54520704261 100644
--- a/lisp/select.el
+++ b/lisp/select.el
@@ -248,7 +248,17 @@ two markers or an overlay. Otherwise, it is nil."
(setq non-unicode t)
(setq eight-bit t)))))
str)
- (setq type (if non-unicode 'COMPOUND_TEXT
+ (setq type (if (or non-unicode
+ (and
+ non-latin-1
+ ;; If a coding is specified for
+ ;; selection, and that is
+ ;; compatible with COMPOUND_TEXT,
+ ;; use it.
+ coding
+ (eq (coding-system-get coding :mime-charset)
+ 'x-ctext)))
+ 'COMPOUND_TEXT
(if non-latin-1 'UTF8_STRING
(if eight-bit 'C_STRING
'STRING))))))))