Mercurial > emacs
comparison lisp/term/mac-win.el @ 83386:db4e74787e6f
Merged from miles@gnu.org--gnu-2005 (patch 133-141, 596-609)
Patches applied:
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-596
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-597
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-598
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-599
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-600
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-601
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-602
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-603
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-604
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-605
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-606
Remove lisp/toolbar directory
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-607
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-608
Update from CVS
* miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-609
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-133
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-134
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-135
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-136
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-137
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-138
Update from CVS: texi/gnus.texi (RSS): Fix key description.
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-139
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-140
Update from CVS
* miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-141
Update from CVS: texi/gnus.texi (Document Server Internals): Addition.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-426
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Wed, 19 Oct 2005 14:06:17 +0000 |
parents | 2a679c81f552 bfc846e38bba |
children | 7d093d9d4479 |
comparison
equal
deleted
inserted
replaced
83385:1cd4072747c6 | 83386:db4e74787e6f |
---|---|
52 ;; -fg *foreground | 52 ;; -fg *foreground |
53 ;; -fn *font | 53 ;; -fn *font |
54 ;; -font *font | 54 ;; -font *font |
55 ;; -foreground *foreground | 55 ;; -foreground *foreground |
56 ;; -geometry .geometry | 56 ;; -geometry .geometry |
57 ;; -i .iconType | |
58 ;; -itype .iconType | |
59 ;; -iconic .iconic | 57 ;; -iconic .iconic |
60 ;; -name .name | 58 ;; -name .name |
61 ;; -reverse *reverseVideo | 59 ;; -reverse *reverseVideo |
62 ;; -rv *reverseVideo | 60 ;; -rv *reverseVideo |
63 ;; -selectionTimeout .selectionTimeout | 61 ;; -selectionTimeout .selectionTimeout |
1197 (coding (or next-selection-coding-system | 1195 (coding (or next-selection-coding-system |
1198 selection-coding-system))) | 1196 selection-coding-system))) |
1199 (when (and (stringp data) | 1197 (when (and (stringp data) |
1200 (setq data-type (get-text-property 0 'foreign-selection data))) | 1198 (setq data-type (get-text-property 0 'foreign-selection data))) |
1201 (cond ((eq data-type 'public.utf16-plain-text) | 1199 (cond ((eq data-type 'public.utf16-plain-text) |
1202 (let ((encoded (and (fboundp 'mac-code-convert-string) | 1200 (if (fboundp 'mac-code-convert-string) |
1203 (mac-code-convert-string data | 1201 (let ((s (mac-code-convert-string data nil coding))) |
1204 'utf-16 coding)))) | 1202 (if s |
1205 (if encoded | 1203 (setq data (decode-coding-string s coding)) |
1206 (let ((coding-save last-coding-system-used)) | 1204 (setq data |
1207 (setq data (decode-coding-string encoded coding)) | 1205 ;; (decode-coding-string data 'utf-16) is |
1208 (setq last-coding-system-used coding-save)) | 1206 ;; not correct because |
1209 (setq data | 1207 ;; public.utf16-plain-text is defined as |
1210 (decode-coding-string data 'utf-16))))) | 1208 ;; native byte order, no BOM. |
1209 (decode-coding-string | |
1210 (mac-code-convert-string data nil 'utf-8) | |
1211 'utf-8)))) | |
1212 ;; No `mac-code-convert-string' means non-Carbon, which | |
1213 ;; implies big endian. | |
1214 (setq data (decode-coding-string data 'utf-16be)))) | |
1211 ((eq data-type 'com.apple.traditional-mac-plain-text) | 1215 ((eq data-type 'com.apple.traditional-mac-plain-text) |
1212 (setq data (decode-coding-string data coding))) | 1216 (setq data (decode-coding-string data coding))) |
1213 ((eq data-type 'public.file-url) | 1217 ((eq data-type 'public.file-url) |
1214 (setq data (decode-coding-string data 'utf-8)) | 1218 (setq data (decode-coding-string data 'utf-8)) |
1215 ;; Remove a trailing nul character. | 1219 ;; Remove a trailing nul character. |
1322 str | 1326 str |
1323 (let ((inhibit-read-only t)) | 1327 (let ((inhibit-read-only t)) |
1324 (remove-text-properties 0 (length str) '(composition nil) str) | 1328 (remove-text-properties 0 (length str) '(composition nil) str) |
1325 (cond | 1329 (cond |
1326 ((eq type 'public.utf16-plain-text) | 1330 ((eq type 'public.utf16-plain-text) |
1327 (let (s) | 1331 (if (fboundp 'mac-code-convert-string) |
1328 (when (and (fboundp 'mac-code-convert-string) | 1332 (let (s) |
1329 (memq coding (find-coding-systems-string str))) | 1333 (when (memq coding (find-coding-systems-string str)) |
1330 (setq coding (coding-system-change-eol-conversion coding 'mac)) | 1334 (setq coding |
1331 (setq s (mac-code-convert-string | 1335 (coding-system-change-eol-conversion coding 'mac)) |
1332 (encode-coding-string str coding) | 1336 (setq s (mac-code-convert-string |
1333 coding 'utf-16))) | 1337 (encode-coding-string str coding) |
1334 (setq str (or s (encode-coding-string str 'utf-16-mac))))) | 1338 coding nil))) |
1339 (setq str (or s | |
1340 ;; (encode-coding-string str | |
1341 ;; 'utf-16-mac) is not correct because | |
1342 ;; public.utf16-plain-text is defined | |
1343 ;; as native byte order, no BOM. | |
1344 (mac-code-convert-string | |
1345 (encode-coding-string str 'utf-8-mac) | |
1346 'utf-8 nil)))) | |
1347 ;; No `mac-code-convert-string' means non-Carbon, which | |
1348 ;; implies big endian. | |
1349 (setq str (encode-coding-string str 'utf-16be-mac)))) | |
1335 ((eq type 'com.apple.traditional-mac-plain-text) | 1350 ((eq type 'com.apple.traditional-mac-plain-text) |
1336 (let ((encodables (find-coding-systems-string str)) | 1351 (let ((encodables (find-coding-systems-string str)) |
1337 (rest mac-script-code-coding-systems)) | 1352 (rest mac-script-code-coding-systems)) |
1338 (unless (memq coding encodables) | 1353 (unless (memq coding encodables) |
1339 (while (and rest (not (memq (cdar rest) encodables))) | 1354 (while (and rest (not (memq (cdar rest) encodables))) |