changeset 53744:ac5e37408488

(x-selection-value): Optimize for ASCII only case.
author Kenichi Handa <handa@m17n.org>
date Thu, 29 Jan 2004 04:56:11 +0000
parents 30797cf81519
children 625168ecac3f
files lisp/term/x-win.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/term/x-win.el	Thu Jan 29 02:54:22 2004 +0000
+++ b/lisp/term/x-win.el	Thu Jan 29 04:56:11 2004 +0000
@@ -2198,8 +2198,10 @@
 			  (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 locale 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)