From: Kenichi Handa Date: Thu, 29 Jan 2004 04:56:11 +0000 (+0000) Subject: (x-selection-value): Optimize for ASCII only case. X-Git-Tag: ttn-vms-21-2-B4~7798 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ef99df9a8695cb7a0a20fdbf3049c1f08a83f01e;p=emacs.git (x-selection-value): Optimize for ASCII only case. --- diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 9e37943032b..5b1bbd57d64 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el @@ -2198,8 +2198,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 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)