]> code.delx.au - gnu-emacs/blobdiff - man/macos.texi
* custom.texi (Init File): Reference Find Init to avoid "home
[gnu-emacs] / man / macos.texi
index 979529438936082e3806fb7835365ff08b6db730..d097b32bd384b5f116b5ce139890e11dfbbf4744 100644 (file)
@@ -1,8 +1,8 @@
 @c This is part of the Emacs manual.
 @c Copyright (C) 2000, 2001, 2002, 2003, 2004,
-@c   2005 Free Software Foundation, Inc.
+@c   2005, 2006 Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
-@node Mac OS, MS-DOS, Antinews, Top
+@node Mac OS, Microsoft Windows, Antinews, Top
 @appendix Emacs and Mac OS
 @cindex Mac OS
 @cindex Macintosh
@@ -42,26 +42,32 @@ features such as file dialogs, drag-and-drop, and Unicode menus.
 @cindex Meta (Mac OS)
 @cindex keyboard coding (Mac OS)
 
-@vindex mac-command-key-is-meta
-  On Mac, Emacs can use either the @key{option} key or the
-@key{command} key as the @key{META} key.  If the value of the variable
-@code{mac-command-key-is-meta} is non-@code{nil} (its default value),
-Emacs uses the @key{command} key as the @key{META} key.  Otherwise it
-uses the @key{option} key as the @key{META} key.
-
-  Most people should want to use the @key{command} key as the @key{META} key,
-so that dead-key processing with the @key{option} key will still work.  This is
-useful for entering non-@acronym{ASCII} Latin characters directly from the Mac
-keyboard, for example.
+@vindex mac-control-modifier
+@vindex mac-command-modifier
+@vindex mac-option-modifier
+@vindex mac-function-modifier
+  On Mac, Emacs can use @key{control}, @key{command}, @key{option}, and
+laptop @key{function} keys as any of Emacs modifier keys except
+@key{SHIFT} (i.e., @key{ALT}, @key{CTRL}, @key{HYPER}, @key{META}, and
+@key{SUPER}).  The assignment is controlled by the variables
+@code{mac-control-modifier}, @code{mac-command-modifier},
+@code{mac-option-modifier}, and @code{mac-function-modifier}.  The value
+for each of these variables can be one of the following symbols:
+@code{alt}, @code{control}, @code{hyper}, @code{meta}, @code{super}, and
+@code{nil} (no particular assignment).  By default, the @key{control}
+key works as @key{CTRL}, and the @key{command} key as @key{META}.
+
+  For the @key{option} key, if @code{mac-option-modifier} is set to
+@code{nil}, which is the default, the key works as the normal
+@key{option} key, i.e., dead-key processing will work.  This is useful
+for entering non-@acronym{ASCII} Latin characters directly from the
+Mac keyboard, for example.
 
   Emacs recognizes the setting in the Keyboard control panel (Mac OS
 Classic) or the International system preference pane (Mac OS X) and
-supports international and alternative keyboard layouts (e.g., Dvorak)
-if its script is either Roman, Japanese, Traditional Chinese, Korean,
-Cyrillic, Simplified Chinese, or Central European.  Keyboard layouts
-based on Unicode may not work properly.  Selecting one of the layouts
-from the keyboard layout pull-down menu will affect how the keys typed
-on the keyboard are interpreted.
+supports international and alternative keyboard layouts (e.g., Dvorak).
+Selecting one of the layouts from the keyboard layout pull-down menu
+will affect how the keys typed on the keyboard are interpreted.
 
 @vindex mac-pass-command-to-system
 @vindex mac-pass-control-to-system
@@ -96,13 +102,6 @@ character codes in the range 128-159.  The coding systems
 @code{mac-roman}, @code{mac-centraleurroman}, and @code{mac-cyrillic}
 are used to represent these Mac encodings.
 
-  The fontset @code{fontset-mac} is created automatically when Emacs
-is run on Mac, and used by default.  It displays as many kinds of
-characters as possible using 12-point Monaco as a base font.  If you
-see some character as a hollow box with this fontset, then it's almost
-impossible to display it only by customizing font settings (@pxref{Mac
-Font Specs}).
-
   You can use input methods provided either by LEIM (@pxref{Input
 Methods}) or Mac OS to enter international characters.  To use the
 former, see the International Character Set Support section of the
@@ -122,7 +121,7 @@ One can still do copy and paste with another application from the Edit
 menu.
 
   On Mac, the role of the coding system for selection that is set by
-@code{set-selection-coding-system} (@pxref{Specify Coding}) is
+@code{set-selection-coding-system} (@pxref{Communication Coding}) is
 two-fold.  First, it is used as a preferred coding system for the
 traditional text flavor that does not specify any particular encodings
 and is mainly used by applications on Mac OS Classic.  Second, it
@@ -136,7 +135,7 @@ Emacs internal encoding using the converter in Emacs.  If the first
 conversion failed, then the UTF-16 data is directly converted to Emacs
 internal encoding using the converter in Emacs.  Copying UTF-16 text
 to the clipboard goes through the inverse path.  The reason for this
-two-path decoding is to avoid subtle differences in Unicode mappings
+two-pass decoding is to avoid subtle differences in Unicode mappings
 between the Mac OS system and Emacs such as various kinds of hyphens,
 and to minimize users' customization.  For example, users that mainly
 use Latin characters would prefer Greek characters to be decoded into
@@ -187,7 +186,7 @@ invoked from the Finder or the @command{open} command.
   Command line arguments are specified like
 
 @example
-/Applications/Emacs.app/Contents/MacOS/Emacs -geometry 80x25 &
+/Applications/Emacs.app/Contents/MacOS/Emacs -g 80x25 &
 @end example
 
 @noindent
@@ -283,8 +282,20 @@ created.
 @cindex font names (Mac OS)
 
   It is rare that you need to specify a font name in Emacs; usually
-you specify face attributes instead.  But when you do need to specify
-a font name in Emacs on Mac, use a standard X font name:
+you specify face attributes instead.  For example, you can use 14pt
+Courier by customizing the default face attributes for all frames:
+
+@lisp
+(set-face-attribute 'default nil
+                    :family "courier" :height 140)
+@end lisp
+
+@noindent
+Alternatively, an interactive one is also available
+(@pxref{Face Customization}).
+
+But when you do need to specify a font name in Emacs on Mac, use a
+standard X font name:
 
 @smallexample
 -@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{}
@@ -294,21 +305,34 @@ a font name in Emacs on Mac, use a standard X font name:
 @noindent
 @xref{Font X}.  Wildcards are supported as they are on X.
 
-  Native Apple fonts in Mac Roman encoding has maker name @code{apple}
-and charset @code{mac-roman}.  For example 12-point Monaco can be
-specified by the name @samp{-apple-monaco-*-12-*-mac-roman}.  When
-using a particular size of scalable fonts, it must be specified in a
-format containing 14 @samp{-}s like
-@samp{-apple-monaco-medium-r-normal--13-*-*-*-*-*-mac-roman}.
+  Emacs on Mac OS Classic uses QuickDraw Text routines for drawing texts
+by default.  Emacs on Mac OS X uses @acronym{ATSUI, Apple Type Services
+for Unicode Imaging} as well as QuickDraw Text, and most of the
+characters other than Chinese, Japanese, and Korean ones are drawn using
+the former by default.
 
-  You can specify a @code{mac-roman} font for @acronym{ASCII}
-characters like
+  @acronym{ATSUI}-compatible fonts have maker name @code{apple} and
+charset @code{iso10646-1}.  For example, 12-point Monaco can be specified
+by the name:
 
-@lisp
+@example
+-apple-monaco-medium-r-normal--12-*-*-*-*-*-iso10646-1
+@end example
+
+Note that it must be specified in a format containing 14 @samp{-}s
+(e.g., not by @samp{-apple-monaco-medium-r-normal--12-*-iso10646-1}),
+because every @acronym{ATSUI}-compatible font is a scalable one.
+
+  QuickDraw Text fonts have maker name @code{apple} and various charset
+names other than @code{iso10646-1}.  Native Apple fonts in Mac Roman
+encoding has charset @code{mac-roman}.  You can specify a
+@code{mac-roman} font for @acronym{ASCII} characters like
+
+@smalllisp
 (add-to-list
  'default-frame-alist
  '(font . "-apple-monaco-medium-r-normal--13-*-*-*-*-*-mac-roman"))
-@end lisp
+@end smalllisp
 
 @noindent
 but that does not extend to ISO-8859-1: specifying a @code{mac-roman}
@@ -322,16 +346,11 @@ charsets @samp{big5-0}, @samp{gb2312.1980-0},
 @samp{mac-cyrillic}, @samp{mac-symbol}, and @samp{mac-dingbats},
 respectively.
 
-  Since Emacs as of the current version uses QuickDraw Text routines
-for drawing texts, only characters in the charsets listed above can be
-displayed with the OS-bundled fonts, even if other applications that
-use @acronym{ATSUI} or Cocoa can display variety of characters with
-them.
-
   The use of @code{create-fontset-from-fontset-spec} (@pxref{Defining
-Fontsets}) for defining fontsets often results in wrong ones
-especially when using only OS-bundled fonts.  The recommended way is
-to create a fontset using @code{create-fontset-from-mac-roman-font}:
+Fontsets}) for defining fontsets often results in wrong ones especially
+when using only OS-bundled QuickDraw Text fonts.  The recommended way to
+use them is to create a fontset using
+@code{create-fontset-from-mac-roman-font}:
 
 @lisp
 (create-fontset-from-mac-roman-font
@@ -355,11 +374,13 @@ encoded in the names of their font suitcases.  E.g., the font suitcase
 the name @samp{-ETL-fixed-*-iso8859-1}.
 
 @vindex mac-allow-anti-aliasing
-  Emacs uses the QuickDraw text rendering by default.  On Mac OS X
-10.2 and later, it can be changed so that it uses the Quartz 2D text
-rendering (aka CG text rendering) by setting
-@code{mac-allow-anti-aliasing} to @code{t}.  However, it is reported
-to sometimes leave some garbages.
+  Mac OS X 10.2 or later can use two types of text renderings: Quartz 2D
+(aka Core Graphics) and QuickDraw.  By default, Emacs uses the former on
+such versions.  It can be changed by setting
+@code{mac-allow-anti-aliasing} to @code{t} (Quartz 2D) or @code{nil}
+(QuickDraw).  Both @acronym{ATSUI} and QuickDraw Text drawings are
+affected by the value of this variable.
+
 
 @node Mac Functions
 @section Mac-Specific Lisp Functions