Mercurial > emacs
comparison lisp/term/mac-win.el @ 69725:3894622d0c1c
(mac-system-coding-system): Define and use after
Mac-specific coding systems are ready.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Thu, 30 Mar 2006 02:23:08 +0000 |
parents | e9b0a8e10992 |
children | 11e77c23e062 c1e013e3dc0e 1ad066d533a9 |
comparison
equal
deleted
inserted
replaced
69724:3c3603207d79 | 69725:3894622d0c1c |
---|---|
1101 (25 . chinese-iso-8bit) ; smSimpChinese | 1101 (25 . chinese-iso-8bit) ; smSimpChinese |
1102 (29 . mac-centraleurroman) ; smCentralEuroRoman | 1102 (29 . mac-centraleurroman) ; smCentralEuroRoman |
1103 ) | 1103 ) |
1104 "Alist of Mac script codes vs Emacs coding systems.") | 1104 "Alist of Mac script codes vs Emacs coding systems.") |
1105 | 1105 |
1106 (defconst mac-system-coding-system | |
1107 (let ((base (or (cdr (assq mac-system-script-code | |
1108 mac-script-code-coding-systems)) | |
1109 'mac-roman))) | |
1110 (if (eq system-type 'darwin) | |
1111 base | |
1112 (coding-system-change-eol-conversion base 'mac))) | |
1113 "Coding system derived from the system script code.") | |
1114 | |
1115 (defun mac-add-charset-info (xlfd-charset mac-text-encoding) | 1106 (defun mac-add-charset-info (xlfd-charset mac-text-encoding) |
1116 "Add a character set to display with Mac fonts. | 1107 "Add a character set to display with Mac fonts. |
1117 Create an entry in `mac-charset-info-alist'. | 1108 Create an entry in `mac-charset-info-alist'. |
1118 XLFD-CHARSET is a string which will appear in the XLFD font name | 1109 XLFD-CHARSET is a string which will appear in the XLFD font name |
1119 to identify the character set. MAC-TEXT-ENCODING is the | 1110 to identify the character set. MAC-TEXT-ENCODING is the |
1150 (define-key key-translation-map [?\x80] "\\")))) | 1141 (define-key key-translation-map [?\x80] "\\")))) |
1151 | 1142 |
1152 (define-key special-event-map [language-change] 'mac-handle-language-change) | 1143 (define-key special-event-map [language-change] 'mac-handle-language-change) |
1153 | 1144 |
1154 ;;;; Selections | 1145 ;;;; Selections |
1155 | |
1156 ;; Setup to use the Mac clipboard. | |
1157 (set-selection-coding-system mac-system-coding-system) | |
1158 | 1146 |
1159 ;;; We keep track of the last text selected here, so we can check the | 1147 ;;; We keep track of the last text selected here, so we can check the |
1160 ;;; current selection against it, and avoid passing back our own text | 1148 ;;; current selection against it, and avoid passing back our own text |
1161 ;;; from x-get-selection-value. | 1149 ;;; from x-get-selection-value. |
1162 (defvar x-last-selected-text-clipboard nil | 1150 (defvar x-last-selected-text-clipboard nil |
2022 | 2010 |
2023 | 2011 |
2024 ;; Enable CLIPBOARD copy/paste through menu bar commands. | 2012 ;; Enable CLIPBOARD copy/paste through menu bar commands. |
2025 (menu-bar-enable-clipboard) | 2013 (menu-bar-enable-clipboard) |
2026 | 2014 |
2015 (defconst mac-system-coding-system | |
2016 (let ((base (or (cdr (assq mac-system-script-code | |
2017 mac-script-code-coding-systems)) | |
2018 'mac-roman))) | |
2019 (if (eq system-type 'darwin) | |
2020 base | |
2021 (coding-system-change-eol-conversion base 'mac))) | |
2022 "Coding system derived from the system script code.") | |
2023 | |
2024 (set-selection-coding-system mac-system-coding-system) | |
2025 | |
2027 (defun mac-drag-n-drop (event) | 2026 (defun mac-drag-n-drop (event) |
2028 "Edit the files listed in the drag-n-drop EVENT. | 2027 "Edit the files listed in the drag-n-drop EVENT. |
2029 Switch to a buffer editing the last file dropped." | 2028 Switch to a buffer editing the last file dropped." |
2030 (interactive "e") | 2029 (interactive "e") |
2031 ;; Make sure the drop target has positive co-ords | 2030 ;; Make sure the drop target has positive co-ords |