emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110497: select.el (xselect--encode-s


From: Kenichi Handa
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110497: select.el (xselect--encode-string): If a coding is specified for selection, and that is compatible with COMPOUND_TEXT, use it.
Date: Wed, 10 Oct 2012 23:48:24 +0900
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110497 [merge]
committer: Kenichi Handa <address@hidden>
branch nick: trunk
timestamp: Wed 2012-10-10 23:48:24 +0900
message:
  select.el (xselect--encode-string): If a coding is specified for selection, 
and that is compatible with COMPOUND_TEXT, use it.
modified:
  lisp/ChangeLog
  lisp/select.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-10-10 09:36:45 +0000
+++ b/lisp/ChangeLog    2012-10-10 14:45:26 +0000
@@ -1,3 +1,8 @@
+2012-10-10  Kenichi Handa  <address@hidden>
+
+       * select.el (xselect--encode-string): If a coding is specified for
+       selection, and that is compatible with COMPOUND_TEXT, use it.
+
 2012-10-10  Martin Rudalics  <address@hidden>
 
        * window.el (switch-to-buffer-preserve-window-point): New option.

=== modified file 'lisp/select.el'
--- a/lisp/select.el    2012-05-09 03:06:08 +0000
+++ b/lisp/select.el    2012-10-10 14:45:26 +0000
@@ -248,7 +248,17 @@
                                    (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))))))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]