Commit ef99df9a authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(x-selection-value): Optimize for ASCII only case.

parent 13f52ed8
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment