aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2012-10-10 23:45:26 +0900
committerKenichi Handa2012-10-10 23:45:26 +0900
commit4ef4a10d1c513bb3b009c29872d0dc621eb826ce (patch)
treea4ea14cddbdfce0f56d0be8fb35040e7faa8114c
parent9d7f027b56081705edabb3e77bb7bd995ccc2fa2 (diff)
downloademacs-4ef4a10d1c513bb3b009c29872d0dc621eb826ce.tar.gz
emacs-4ef4a10d1c513bb3b009c29872d0dc621eb826ce.zip
select.el (xselect--encode-string): If a coding is specified for selection, and that is compatible with COMPOUND_TEXT, use it.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/select.el12
2 files changed, 16 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 59eba7a7d27..69a03f2b170 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-10-10 Kenichi Handa <handa@gnu.org>
2
3 * select.el (xselect--encode-string): If a coding is specified for
4 selection, and that is compatible with COMPOUND_TEXT, use it.
5
12012-10-10 Martin Rudalics <rudalics@gmx.at> 62012-10-10 Martin Rudalics <rudalics@gmx.at>
2 7
3 * window.el (switch-to-buffer-preserve-window-point): New option. 8 * window.el (switch-to-buffer-preserve-window-point): New option.
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."
248 (setq non-unicode t) 248 (setq non-unicode t)
249 (setq eight-bit t))))) 249 (setq eight-bit t)))))
250 str) 250 str)
251 (setq type (if non-unicode 'COMPOUND_TEXT 251 (setq type (if (or non-unicode
252 (and
253 non-latin-1
254 ;; If a coding is specified for
255 ;; selection, and that is
256 ;; compatible with COMPOUND_TEXT,
257 ;; use it.
258 coding
259 (eq (coding-system-get coding :mime-charset)
260 'x-ctext)))
261 'COMPOUND_TEXT
252 (if non-latin-1 'UTF8_STRING 262 (if non-latin-1 'UTF8_STRING
253 (if eight-bit 'C_STRING 263 (if eight-bit 'C_STRING
254 'STRING)))))))) 264 'STRING))))))))