aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2000-12-05 13:01:11 +0000
committerEli Zaretskii2000-12-05 13:01:11 +0000
commitebc956ca4131d35a8f8fd9d2e967706ec2e96199 (patch)
treec6e7ff2ebf2051b798b63550f35c20c9c3c3debb
parent9b96232f57f6a21d76b2197e7cbd0e3a001187de (diff)
downloademacs-ebc956ca4131d35a8f8fd9d2e967706ec2e96199.tar.gz
emacs-ebc956ca4131d35a8f8fd9d2e967706ec2e96199.zip
New file.
-rw-r--r--man/macos.texi235
1 files changed, 235 insertions, 0 deletions
diff --git a/man/macos.texi b/man/macos.texi
new file mode 100644
index 00000000000..95b6b0c8310
--- /dev/null
+++ b/man/macos.texi
@@ -0,0 +1,235 @@
1@c This is part of the Emacs manual.
2@c Copyright (C) 2000 Free Software Foundation, Inc.
3@c See file emacs.texi for copying conditions.
4@node Mac OS, MS-DOS, Antinews, Top
5@appendix Emacs and the Mac OS
6@cindex Mac OS
7@cindex Macintosh
8
9 Emacs built on the Mac OS supports many of its major features:
10multiple frames, colors, scroll bars, menu bars, use of the mouse,
11fontsets, international characters, input methods, coding systems, and
12synchronous subprocesses (@code{call-process}). Much of this works in
13the same way as on other platforms and is therefore documented in the
14rest of this manual. This section describes the peculiarities of using
15Emacs under the Mac OS.
16
17 The following features of Emacs are not yet supported on the Mac:
18unexec (@code{dump-emacs}), asynchronous subprocesses
19(@code{start-process}), and networking (@code{open-network-connection}).
20As a result, packages such as Gnus, Ispell, and Comint do not work.
21
22 Since external Unix programs to handle commands such as
23@code{print-buffer} and @code{diff} are not available on the Mac OS,
24they are not supported in the Mac OS version.
25
26@menu
27* Mac Input:: Keyboard input on the Mac.
28* Mac International:: International character set support on the Mac.
29* Mac Environment Variables:: Setting environment variables for Emacs.
30* Mac Directories:: Volumes and directories on the Mac.
31* Mac Font Specs:: Specifying fonts on the Mac.
32* Mac Functions:: Mac specific Lisp functions.
33@end menu
34
35
36@node Mac Input
37@section Keyboard Input on the Mac
38@cindex Meta (under Mac OS)
39@cindex Mac keyboard coding
40@vindex mac-command-key-is-meta
41@vindex mac-keyboard-text-encoding
42
43 On the Mac, Emacs can use either the @key{option} key or the
44@key{command} key as the @key{META} key. If the value of the variable
45@code{mac-command-key-is-meta} is non-@code{nil} (its default value),
46Emacs uses the @key{command} key as the @key{META} key. Otherwise it uses the
47@key{option} key as the @key{META} key.
48
49 Most people should want to use the @key{command} key as the @key{META} key,
50so that dead-key processing with the @key{option} key will still work. This is
51useful for entering non-ASCII Latin characters directly from the Mac
52keyboard, for example.
53
54 Emacs recognizes the setting in the Keyboard control panel and
55supports international and alternative keyboard layouts (e.g., Dvorak).
56Selecting one of the layouts from the keyboard layout pull-down menu
57will affect how the keys typed on the keyboard are interpreted.
58
59 The Mac OS intercepts and handles certain key combinations (e.g.,
60@key{command}-@key{SPC} for switching input languages). These will not
61be passed to Emacs.
62
63 The Mac keyboard ordinarily generates characters in the Mac Roman
64encoding. To use it for entering ISO Latin-1 characters directly, set
65the value of the variable @code{mac-keyboard-text-encoding} to
66@code{kTextEncodingISOLatin1}. Note that that not all Mac Roman
67characters that can be entered at the keyboard can be converted to ISO
68Latin-1 characters.
69
70 To enter ISO Latin-2 characters directly from the Mac keyboard. Set
71the value of @code{mac-keyboard-text-encoding} to
72@code{kTextEncodingISOLatin2}. Then let Emacs know that the keyboard
73generates Latin-2 codes by typink @kbd{C-x RET k iso-latin-2 RET}. To
74make this setting permanent, put this in your @file{.emacs} init file:
75
76@lisp
77 (set-keyboard-coding-system 'iso-latin-2)
78@end lisp
79
80@node Mac International
81@section International Character Set Support on the Mac
82@cindex Mac Roman coding system
83@cindex Mac clipboard support
84
85 The Mac uses a non-standard encoding for the upper 128 single-byte
86characters. It also deviates from the ISO 2022 standard by using code
87points in the range 128-159. The coding system @code{mac-roman} is used
88to represent this Mac encoding. It is used for editing files stored in
89this native encoding, and for displaying filenames in Dired mode.
90
91 Any native (non-symbol) Mac font can be used to correctly display
92characters in the @code{mac-roman} coding system.
93
94 The fontset @code{fontset-mac} is created automatically when Emacs is
95run on the Mac by the following expression. It displays characters in
96the @code{mac-roman} coding system using 12-point Monaco.
97
98 To insert characters directly in the @code{mac-roman} coding system,
99type @kbd{C-x RET k mac-roman RET}, or put this in your @file{.emacs}
100init file:
101
102@lisp
103(set-keyboard-coding-system 'mac-roman)
104@end lisp
105
106@noindent
107This is useful for editing documents in native Mac encoding.
108
109 You can use input methods provided either by LEIM (@pxref{Input
110Methods}) or the Mac OS to enter international characters.
111
112 To use the former, see the International Character Set Support section
113of the manual.
114
115 To use input methods provided by the Mac OS, set the keyboard coding
116system accordingly using the @kbd{C-x RET k} command
117(@code{set-keyboard-coding-system}). For example, for Traditional
118Chinese, use the @samp{chinese-big5} as keyboard coding system; for
119Japanese, use @samp{sjis}, etc. Then select the desired input method in
120the keyboard layout pull-down menu.
121
122 The Mac clipboard and the Emacs kill ring (@pxref{Killing}) are
123connected as follows: the most recent kill is copied to the clipboard
124when Emacs is suspended and the contents of the clipboard is inserted
125into the kill ring when Emacs resumes. The result is that you can yank
126a piece of text and paste it into another Mac application, or cut or copy
127one in another Mac application and yank it into a Emacs buffer.
128
129 The encoding of text selections must be specified using the commands
130@kbd{C-x RET x} (@code{set-selection-coding-system}) or @kbd{C-x RET X}
131(@code{set-next-selection-coding-system}) (e.g., for Traditional
132Chinese, use the @samp{chinese-big5-mac} and for Japanese,
133@samp{sjis-mac}). @xref{Specify Coding}, for more details.
134
135
136@node Mac Environment Variables
137@section Environment Variables and Command Line Arguments.
138@cindex Mac environment variables
139
140 Environment variables and command line arguments for Emacs can be set
141by modifying the @samp{STR#} resources 128 and 129, respectively. A common
142environment variable that one may want to set is @samp{HOME}.
143
144 The way to set an environment variable is by adding a string of the
145form
146
147@example
148ENV_VAR=VALUE
149@end example
150
151@noindent
152to resource @samp{STR#} number 128 using @code{ResEdit}. To set up the
153program to use unibyte characters exclusively, for example, add the
154string
155
156@example
157EMACS_UNIBYTE=1
158@end example
159
160
161@node Mac Directories
162@section Volumes and Directories on the Mac
163@cindex file names under Mac OS
164
165 The directory structure in the Mac OS is seen by Emacs as
166
167@example
168/<volumename>/<pathname>
169@end example
170
171So when Emacs requests a file name, doing filename completion on
172@file{/} will display all volumes on the system. As in Unix, @file{..}
173can be used to go up a directory level.
174
175 To access files and folders on the desktop, look in the folder
176@file{Desktop Folder} in your boot volume (this folder is usually
177invisible in the Mac @code{Finder}).
178
179 Emacs creates the Mac folder @file{:Preferences:Emacs:} in the
180@file{System Folder} and uses it as the temporary directory. The Unix
181emulation code maps the Unix directory @file{/tmp} to it. Therefore it
182is best to avoid naming a volume @file{tmp}. If everything works
183correctly, the program should leave no files in it when it exits. You
184should be able to set the environment variable @code{TMPDIR} to use
185another directory but this folder will still be created.
186
187
188@node Mac Font Specs
189@section Specifying Fonts on the Mac
190@cindex font names under Mac OS
191
192 Fonts are specified to Emacs on the Mac in the form of a standard X
193font name. I.e.,
194
195@example
196 -FOUNDRY-FAMILY-WEIGHT-SLANT-WIDTH--PIXELS-POINTS-
197 HRES-VRES-SPACING-AVEWIDTH-CHARSET
198@end example
199
200where the fields refer to foundry, font family, weight, slant, width,
201pixels, point size, horizontal resolution, vertical resolution, spacing,
202average width, and character set, respectively.
203
204Wildcards are supported as they are on X.
205
206 Native Apple fonts in Mac Roman encoding has foundry name @code{apple}
207and charset @code{mac-roman}. For example 12-point Monaco can be
208specified by the name @samp{-apple-monaco-*-12-*-mac-roman}.
209
210 Native Apple Traditional Chinese, Simplified Chinese, Japanese, and
211Korean fonts have charsets @samp{big5-0}, @samp{gb2312-0},
212@samp{jisx0208.1983-sjis}, and @samp{ksc5601-1}, respectively.
213
214 Single-byte fonts converted from GNU fonts in BDF format, which are not
215in the Mac Roman encoding, have foundry, family, and character sets
216encoded in the names of their font suitcases. E.g., the font suitcase
217@samp{ETL-Fixed-ISO8859-1} contains fonts which can be referred to by
218the name @samp{-ETL-fixed-*-iso8859-1}.
219
220
221@node Mac Functions
222@section Mac Specific Lisp Functions
223@cindex Lisp functions on the Mac OS
224
225@findex do-applescript
226 The function @code{do-applescript} takes a string argument,
227executes it as an AppleScript command, and returns the result as a
228string.
229
230@findex mac-filename-to-unix
231@findex unix-filename-to-mac
232 The function @code{mac-filename-to-unix} takes a Mac pathname and
233returns the Unix equivalent. The function @code{unix-filename-to-mac}
234performs the opposite conversion. They are useful for constructing
235AppleScript commands to be passed to @code{do-applescript}.