diff options
| author | YAMAMOTO Mitsuharu | 2005-05-13 08:51:35 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2005-05-13 08:51:35 +0000 |
| commit | 5a537870e39b4caf1dccc69c07b499ed9a69f8de (patch) | |
| tree | 9aeab5a9a70b2233d695b4da741213c7947a5b71 | |
| parent | 66b8e07b28ba264dddbe36a036225879c8d8b4a1 (diff) | |
| download | emacs-5a537870e39b4caf1dccc69c07b499ed9a69f8de.tar.gz emacs-5a537870e39b4caf1dccc69c07b499ed9a69f8de.zip | |
(mac-select-convert-to-string): Try coding
systems in mac-script-code-coding-systems if specified one cannot
encode string for `com.apple.traditional-mac-plain-text'.
| -rw-r--r-- | lisp/term/mac-win.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 8fbbc7cd41a..366668c66f3 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el | |||
| @@ -1328,6 +1328,13 @@ in `selection-converter-alist', which see." | |||
| 1328 | coding 'utf-16))) | 1328 | coding 'utf-16))) |
| 1329 | (setq str (or s (encode-coding-string str 'utf-16-mac))))) | 1329 | (setq str (or s (encode-coding-string str 'utf-16-mac))))) |
| 1330 | ((eq type 'com.apple.traditional-mac-plain-text) | 1330 | ((eq type 'com.apple.traditional-mac-plain-text) |
| 1331 | (let ((encodables (find-coding-systems-string str)) | ||
| 1332 | (rest mac-script-code-coding-systems)) | ||
| 1333 | (unless (memq coding encodables) | ||
| 1334 | (while (and rest (not (memq (cdar rest) encodables))) | ||
| 1335 | (setq rest (cdr rest))) | ||
| 1336 | (if rest | ||
| 1337 | (setq coding (cdar rest))))) | ||
| 1331 | (setq coding (coding-system-change-eol-conversion coding 'mac)) | 1338 | (setq coding (coding-system-change-eol-conversion coding 'mac)) |
| 1332 | (setq str (encode-coding-string str coding))) | 1339 | (setq str (encode-coding-string str coding))) |
| 1333 | (t | 1340 | (t |