From: YAMAMOTO Mitsuharu Date: Sat, 25 Mar 2006 07:40:46 +0000 (+0000) Subject: Adjust Courier font specifications in x-fixed-font-alist. X-Git-Tag: emacs-pretest-22.0.90~3432 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0f49150ef42e29ee4c1f952b5047826aabd2397b;p=emacs.git 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 --git a/lisp/ChangeLog b/lisp/ChangeLog index d268e0aaa12..d4196ab799b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2006-03-25 YAMAMOTO Mitsuharu + + * frame.el (select-frame-by-name): Call x-focus-frame also when + window-system is mac. + + * term/mac-win.el: 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. + 2006-03-25 Kim F. Storm * emulation/cua-base.el (cua-rectangle-mark-key): New defcustom. diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 4ccb017682c..38795d38461 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -1336,7 +1336,8 @@ in `selection-converter-alist', which see." (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 @@ It returns a name of the created fontset." (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")