]> git.eshelyaron.com Git - emacs.git/commitdiff
(x-selection-value): Optimize for ASCII only case.
authorKenichi Handa <handa@m17n.org>
Thu, 29 Jan 2004 04:58:35 +0000 (04:58 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 29 Jan 2004 04:58:35 +0000 (04:58 +0000)
lisp/term/x-win.el

index 12991037a6039899f08e82eb012f4447f924676d..735d21c8e9e1f8d3617b0d22ae5563d3455c66bc 100644 (file)
@@ -2199,8 +2199,10 @@ order until succeed.")
                          (error nil))
                   utf8-coding last-coding-system-used)
             (if utf8
-                ;; If it is a locale selection, choose it.
-                (or (get-text-property 0 'foreign-selection utf8)
+                ;; If it is a local selection, or it contains only
+                ;; ASCII characers, choose it.
+                (if (or (not (get-text-property 0 'foreign-selection utf8))
+                        (= (length utf8) (string-bytes utf8)))
                     (setq text utf8)))
             ;; If not yet decided, try COMPOUND_TEXT.
             (if (not text)