changeset 89785:c4b9388edcc3

(x-selection-value): Optimize for ASCII only case.
author Kenichi Handa <handa@m17n.org>
date Thu, 29 Jan 2004 04:58:35 +0000
parents 4afbf3431108
children cce22763e5b1
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:55:51 2004 +0000
+++ b/lisp/term/x-win.el	Thu Jan 29 04:58:35 2004 +0000
@@ -2199,8 +2199,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 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)