# HG changeset patch # User YAMAMOTO Mitsuharu # Date 1143272432 0 # Node ID e9b0a8e109924f31a3e0446a6dfdd46a58efeff2 # Parent cdfc7cf7bfbe85f180e963fd4d1a1b6776a236f0 Adjust Courier font specifications in x-fixed-font-alist. (mac-select-convert-to-string): Use utf-16be-mac or utf-16le-mac when directly encoding to UTF-16 in native byte order, no BOM. diff -r cdfc7cf7bfbe -r e9b0a8e10992 lisp/term/mac-win.el --- a/lisp/term/mac-win.el Sat Mar 25 07:40:18 2006 +0000 +++ b/lisp/term/mac-win.el Sat Mar 25 07:40:32 2006 +0000 @@ -1336,7 +1336,8 @@ (setq str (or s (encode-coding-string str (if (eq (byteorder) ?B) - 'utf-16be 'utf-16le)))))) + 'utf-16be-mac + 'utf-16le-mac)))))) ((eq type 'com.apple.traditional-mac-plain-text) (let ((encodables (find-coding-systems-string str)) (rest mac-script-code-coding-systems)) @@ -1896,6 +1897,22 @@ (fontset-add-mac-fonts fontset t) fontset)) +;; Adjust Courier font specifications in x-fixed-font-alist. +(let ((courier-fonts (assoc "Courier" x-fixed-font-alist))) + (if courier-fonts + (dolist (label-fonts (cdr courier-fonts)) + (setcdr label-fonts + (mapcar + (lambda (font) + (if (string-match "\\`-adobe-courier-\\([^-]*\\)-\\(.\\)-\\(.*\\)-iso8859-1\\'" font) + (replace-match + (if (string= (match-string 2 font) "o") + "-*-courier-\\1-i-\\3-*-*" + "-*-courier-\\1-\\2-\\3-*-*") + t nil font) + font)) + (cdr label-fonts)))))) + ;; Setup the default fontset. (setup-default-fontset) (cond ((x-list-fonts "*-iso10646-1")