diff options
author | Kenichi Handa <handa@gnu.org> | 2012-10-10 23:45:26 +0900 |
---|---|---|
committer | Kenichi Handa <handa@gnu.org> | 2012-10-10 23:45:26 +0900 |
commit | 4ef4a10d1c513bb3b009c29872d0dc621eb826ce (patch) | |
tree | a4ea14cddbdfce0f56d0be8fb35040e7faa8114c /lisp/select.el | |
parent | 9d7f027b56081705edabb3e77bb7bd995ccc2fa2 (diff) | |
download | emacs-4ef4a10d1c513bb3b009c29872d0dc621eb826ce.tar.gz |
select.el (xselect--encode-string): If a coding is specified for selection, and that is compatible with COMPOUND_TEXT, use it.
Diffstat (limited to 'lisp/select.el')
-rw-r--r-- | lisp/select.el | 12 |
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)))))))) |