Mercurial > emacs
comparison lisp/term/mac-win.el @ 32786:3d21222bc794
Andrew Choi <akochoi@i-cable.com>
* international/mule-conf.el (mac-roman-lower, mac-roman-upper):
New charsets.
* term/mac-win.el: Remove definitions of mac-roman-lower and
mac-roman-upper, require dired, and define instead of set
mac-ready-for-drag-n-drop to avoid compilation error.
* src/macterm.c (XTread_socket): check whether Lisp variable
mac-ready-for-drag-n-drop is bound rather than non-nil value.
author | Andrew Choi <akochoi@shaw.ca> |
---|---|
date | Mon, 23 Oct 2000 17:49:59 +0000 |
parents | 923b8d6d8277 |
children | a72416fbef44 |
comparison
equal
deleted
inserted
replaced
32785:fc837c2f746a | 32786:3d21222bc794 |
---|---|
101 (fset 'x-get-resource 'ignore) | 101 (fset 'x-get-resource 'ignore) |
102 | 102 |
103 ;; Use Lisp verison of ls instead of calling subprocess on ls (faster, | 103 ;; Use Lisp verison of ls instead of calling subprocess on ls (faster, |
104 ;; don't need to write ls). | 104 ;; don't need to write ls). |
105 (load "ls-lisp") | 105 (load "ls-lisp") |
106 | |
107 (require 'dired) | |
108 | |
106 ;; This variable specifies the Unix program to call (as a process) to | 109 ;; This variable specifies the Unix program to call (as a process) to |
107 ;; deteremine the amount of free space on a file system (defaults to | 110 ;; deteremine the amount of free space on a file system (defaults to |
108 ;; df). If it is not set to nil, ls-lisp will not work correctly | 111 ;; df). If it is not set to nil, ls-lisp will not work correctly |
109 ;; unless an external application df is implemented on the Mac. | 112 ;; unless an external application df is implemented on the Mac. |
110 (setq dired-free-space-program nil) | 113 (setq dired-free-space-program nil) |
116 | 119 |
117 ;; X Window emulation in macterm.c is not complete enough to start a | 120 ;; X Window emulation in macterm.c is not complete enough to start a |
118 ;; frame without a minibuffer properly. Call this to tell ediff | 121 ;; frame without a minibuffer properly. Call this to tell ediff |
119 ;; library to use a single frame. | 122 ;; library to use a single frame. |
120 (ediff-toggle-multiframe) | 123 (ediff-toggle-multiframe) |
121 | |
122 ;; Emacs must be told we're using an 8-bit code for file names. | |
123 ;; Otherwise file names won't be displayed properly in dired mode, | |
124 ;; etc. | |
125 (setq file-name-coding-system 'latin-1) | |
126 | 124 |
127 ;; Setup to use the Mac clipboard. The functions mac-cut-function and | 125 ;; Setup to use the Mac clipboard. The functions mac-cut-function and |
128 ;; mac-paste-function are defined in mac.c. | 126 ;; mac-paste-function are defined in mac.c. |
129 (set-selection-coding-system 'compound-text-mac) | 127 (set-selection-coding-system 'compound-text-mac) |
130 | 128 |
156 (raise-frame) | 154 (raise-frame) |
157 (recenter))) | 155 (recenter))) |
158 | 156 |
159 (global-set-key [drag-n-drop] 'mac-drag-n-drop) | 157 (global-set-key [drag-n-drop] 'mac-drag-n-drop) |
160 | 158 |
161 ; Tell event loop in macterm.c we are ready. | 159 ;; By checking whether the variable mac-ready-for-drag-n-drop has been |
162 (setq mac-ready-for-drag-n-drop t) | 160 ;; defined, the event loop in macterm.c can be informed that it can |
161 ;; now receive Finder drag and drop events. Files dropped onto the | |
162 ;; Emacs application icon can only be processed when the initial frame | |
163 ;; has been created: this is where the files should be opened. | |
164 (add-hook 'after-init-hook | |
165 '(lambda () | |
166 (defvar mac-ready-for-drag-n-drop t))) | |
163 | 167 |
164 ; Define constant values to be set to mac-keyboard-text-encoding | 168 ; Define constant values to be set to mac-keyboard-text-encoding |
165 (defconst kTextEncodingMacRoman 0) | 169 (defconst kTextEncodingMacRoman 0) |
166 (defconst kTextEncodingISOLatin1 513 "0x201") | 170 (defconst kTextEncodingISOLatin1 513 "0x201") |
167 (defconst kTextEncodingISOLatin2 514 "0x202") | 171 (defconst kTextEncodingISOLatin2 514 "0x202") |
170 ;; The Mac Roman encoding uses all 128 code points in the range 128 to | 174 ;; The Mac Roman encoding uses all 128 code points in the range 128 to |
171 ;; 255 for actual characters. Since Emacs cannot handle this many | 175 ;; 255 for actual characters. Since Emacs cannot handle this many |
172 ;; code points as one character set, we divide it into two: | 176 ;; code points as one character set, we divide it into two: |
173 ;; mac-roman-lower for code points 128 to 159 and mac-roman-upper for | 177 ;; mac-roman-lower for code points 128 to 159 and mac-roman-upper for |
174 ;; code points 160 to 255. | 178 ;; code points 160 to 255. |
175 | |
176 (defvar mac-roman-lower-final-char | |
177 (get-unused-iso-final-char 1 96)) | |
178 | |
179 (defvar mac-roman-upper-final-char | |
180 (1+ mac-roman-lower-final-char)) | |
181 | |
182 (define-charset nil 'mac-roman-lower | |
183 (vector 1 96 1 0 mac-roman-lower-final-char 1 | |
184 "Mac Roman lower" "Mac Roman lower" "Mac Roman lower")) | |
185 | |
186 (define-charset nil 'mac-roman-upper | |
187 (vector 1 96 1 0 mac-roman-upper-final-char 1 | |
188 "Mac Roman upper" "Mac Roman upper" "Mac Roman upper")) | |
189 | 179 |
190 ;; Since Mac Roman does not follow the ISO 2022 standard and uses code | 180 ;; Since Mac Roman does not follow the ISO 2022 standard and uses code |
191 ;; points in the range 128-159, it is necessary to define it as a | 181 ;; points in the range 128-159, it is necessary to define it as a |
192 ;; type-4 charset, with CCL programs and all. | 182 ;; type-4 charset, with CCL programs and all. |
193 | 183 |