mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-29 01:33:29 -07:00
(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'.
This commit is contained in:
parent
66b8e07b28
commit
5a537870e3
1 changed files with 7 additions and 0 deletions
|
|
@ -1328,6 +1328,13 @@ in `selection-converter-alist', which see."
|
|||
coding 'utf-16)))
|
||||
(setq str (or s (encode-coding-string str 'utf-16-mac)))))
|
||||
((eq type 'com.apple.traditional-mac-plain-text)
|
||||
(let ((encodables (find-coding-systems-string str))
|
||||
(rest mac-script-code-coding-systems))
|
||||
(unless (memq coding encodables)
|
||||
(while (and rest (not (memq (cdar rest) encodables)))
|
||||
(setq rest (cdr rest)))
|
||||
(if rest
|
||||
(setq coding (cdar rest)))))
|
||||
(setq coding (coding-system-change-eol-conversion coding 'mac))
|
||||
(setq str (encode-coding-string str coding)))
|
||||
(t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue