# HG changeset patch # User Kenichi Handa # Date 1075352315 0 # Node ID c4b9388edcc3177c827953cffea7175fc37f6425 # Parent 4afbf34311088a3e2c76e4f4b9a35e9256d873cd (x-selection-value): Optimize for ASCII only case. diff -r 4afbf3431108 -r c4b9388edcc3 lisp/term/x-win.el --- 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)