From: YAMAMOTO Mitsuharu Date: Sat, 6 May 2006 06:50:10 +0000 (+0000) Subject: (mac-utxt-to-string): Don't make adjustment for X-Git-Tag: emacs-pretest-22.0.90~2768 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e834108f7df677ac323d554934fd6ea60560e289;p=emacs.git (mac-utxt-to-string): Don't make adjustment for MacJapanese if text is ASCII-only. --- diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 6495f30e2c7..8e810284b75 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -1265,8 +1265,10 @@ correspoinding TextEncodingBase value." ;; reverse solidus? (if (string-match "[\xa0\xfd-\xff]" str) (setq str nil) - (subst-char-in-string ?\x5c ?\¥ str t) - (subst-char-in-string ?\x80 ?\\ str t)))) + ;; ASCII-only? + (unless (string-match "\\`[[:ascii:]]*\\'" str) + (subst-char-in-string ?\x5c ?\¥ str t) + (subst-char-in-string ?\x80 ?\\ str t))))) (or str (decode-coding-string data (if (eq (byteorder) ?B) 'utf-16be 'utf-16le)))))