# HG changeset patch # User Kenichi Handa # Date 1075352171 0 # Node ID ac5e374084889f923ae33f834a520b424e3a7503 # Parent 30797cf81519c6d8b6d3914ea7c33a49e64d426a (x-selection-value): Optimize for ASCII only case. diff -r 30797cf81519 -r ac5e37408488 lisp/term/x-win.el --- 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)