Mercurial > emacs
diff lisp/term/mac-win.el @ 83502:c1e013e3dc0e
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-173
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-174
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-175
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-176
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-177
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-178
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-179
Update from erc--emacs--0
* emacs@sv.gnu.org/emacs--devo--0--patch-180
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-181
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-182
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-183
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-184
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-185
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-186
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-187
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/gnus--rel--5.10--patch-65
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-66
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-67
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-68
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-69
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-70
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-71
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-72
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-542
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sat, 01 Apr 2006 13:24:42 +0000 |
parents | b98066f4aa10 3894622d0c1c |
children | d9f8d2a65d18 |
line wrap: on
line diff
--- a/lisp/term/mac-win.el Sat Apr 01 12:54:10 2006 +0000 +++ b/lisp/term/mac-win.el Sat Apr 01 13:24:42 2006 +0000 @@ -1103,15 +1103,6 @@ ) "Alist of Mac script codes vs Emacs coding systems.") -(defconst mac-system-coding-system - (let ((base (or (cdr (assq mac-system-script-code - mac-script-code-coding-systems)) - 'mac-roman))) - (if (eq system-type 'darwin) - base - (coding-system-change-eol-conversion base 'mac))) - "Coding system derived from the system script code.") - (defun mac-add-charset-info (xlfd-charset mac-text-encoding) "Add a character set to display with Mac fonts. Create an entry in `mac-charset-info-alist'. @@ -1153,9 +1144,6 @@ ;;;; Selections -;; Setup to use the Mac clipboard. -(set-selection-coding-system mac-system-coding-system) - ;;; We keep track of the last text selected here, so we can check the ;;; current selection against it, and avoid passing back our own text ;;; from x-get-selection-value. @@ -1336,7 +1324,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 +1885,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") @@ -2007,6 +2012,17 @@ ;; Enable CLIPBOARD copy/paste through menu bar commands. (menu-bar-enable-clipboard) +(defconst mac-system-coding-system + (let ((base (or (cdr (assq mac-system-script-code + mac-script-code-coding-systems)) + 'mac-roman))) + (if (eq system-type 'darwin) + base + (coding-system-change-eol-conversion base 'mac))) + "Coding system derived from the system script code.") + +(set-selection-coding-system mac-system-coding-system) + (defun mac-drag-n-drop (event) "Edit the files listed in the drag-n-drop EVENT. Switch to a buffer editing the last file dropped."