Mercurial > emacs
changeset 69671:e9b0a8e10992
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.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Sat, 25 Mar 2006 07:40:32 +0000 |
parents | cdfc7cf7bfbe |
children | e9eec692c5d8 |
files | lisp/term/mac-win.el |
diffstat | 1 files changed, 18 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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")