XEmacs 21.4.4 "Artificial Intelligence".
[chise/xemacs-chise.git.1] / man / xemacs / custom.texi
index bcb9764..608c2cc 100644 (file)
@@ -7,12 +7,12 @@
 behavior of Emacs in minor ways.
 
   All kinds of customization affect only the particular Emacs job that you
-do them in.  They are completely lost when you kill the Emacs job, and have
-no effect on other Emacs jobs you may run at the same time or later.  The
-only way an Emacs job can affect anything outside of it is by writing a
-file; in particular, the only way to make a customization `permanent' is to
-put something in your @file{.emacs} file or other appropriate file to do the
-customization in each session.  @xref{Init File}.
+do them in.  They are completely lost when you kill the Emacs job, and
+have no effect on other Emacs jobs you may run at the same time or
+later.  The only way an Emacs job can affect anything outside of it is
+by writing a file; in particular, the only way to make a customization
+`permanent' is to put something in your init file or other appropriate
+file to do the customization in each session.  @xref{Init File}.
 
 @menu
 * Minor Modes::     Each minor mode is one feature you can turn on
@@ -26,11 +26,12 @@ customization in each session.  @xref{Init File}.
                      By changing them, you can "redefine keys".
 * Syntax::          The syntax table controls how words and expressions
                      are parsed.
-* Init File::       How to write common customizations in the @file{.emacs} 
-                     file.
-* Audible Bell::    Changing how Emacs sounds the bell. 
-* Faces::           Changing the fonts and colors of a region of text. 
-* X Resources::            X resources controlling various aspects of the
+* Init File::       How to write common customizations in the init file.
+* Audible Bell::    Changing how Emacs sounds the bell.
+* Faces::           Changing the fonts and colors of a region of text.
+* Frame Components::  Controlling the presence and positions of the
+                     menubar, toolbars, and gutters.
+* X Resources::     X resources controlling various aspects of the
                      behavior of XEmacs.
 @end menu
 
@@ -178,7 +179,8 @@ except where explicitly stated, affects only the current Emacs session.
 @findex customize
 @cindex customization buffer
   A convenient way to find the user option variables that you want to
-change, and then change them, is with @kbd{M-x customize}.  This command
+change, and then change them, is with @kbd{M-x customize} (or use a
+keyboard shortcut, @kbd{C-h C}.  This command
 creates a @dfn{customization buffer} with which you can browse through
 the Emacs user options in a logically organized structure, then edit and
 set their values.  You can also use the customization buffer to save
@@ -202,8 +204,8 @@ structure as of yet, but we are adding the rest.)
 @dfn{groups} to help you find them.  Groups are collected into bigger
 groups, all the way up to a master group called @code{Emacs}.
 
-  @kbd{M-x customize} creates a customization buffer that shows the
-top-level @code{Emacs} group and the second-level groups immediately
+  @kbd{M-x customize} (or @kbd{C-h C}) creates a customization buffer that
+shows the top-level @code{Emacs} group and the second-level groups immediately
 under it.  It looks like this, in part:
 
 @smallexample
@@ -385,10 +387,10 @@ C-j},
 @cindex saving option value
   Setting the option changes its value in the current Emacs session;
 @dfn{saving} the value changes it for future sessions as well.  This
-works by writing code into your @file{~/.emacs} file so as to set the
-option variable again each time you start Emacs.  To save the option,
-invoke @samp{[State]} and select the @samp{Save for Future Sessions}
-operation.
+works by writing code into your init file so as to set the option
+variable again each time you start Emacs.  @xref{Init File}.  To save
+the option, invoke @samp{[State]} and select the @samp{Save for Future
+Sessions} operation.
 
   You can also restore the option to its standard value by invoking
 @samp{[State]} and selecting the @samp{Reset} operation.  There are
@@ -748,7 +750,7 @@ long file that contains no page markers and has no local variables list.
 list.  That is inappropriate.  Whether you use Auto Fill mode or not is
 a matter of personal taste, not a matter of the contents of particular
 files.  If you want to use Auto Fill, set up major mode hooks with your
-@file{.emacs} file to turn it on (when appropriate) for you alone
+init file to turn it on (when appropriate) for you alone
 (@pxref{Init File}).  Don't try to use a local variable list that would
 impose your taste on everyone working with the file.
 
@@ -761,16 +763,16 @@ XEmacs uses the information between them to determine what the major
 mode and variable settings should be.  For example, these are all legal:
 
 @example
-       ;;; -*- mode: emacs-lisp -*-
-       ;;; -*- mode: postscript; version-control: never -*-
-       ;;; -*- tags-file-name: "/foo/bar/TAGS" -*-
+        ;;; -*- mode: emacs-lisp -*-
+        ;;; -*- mode: postscript; version-control: never -*-
+        ;;; -*- tags-file-name: "/foo/bar/TAGS" -*-
 @end example
 
 For historical reasons, the syntax @code{`-*- modename -*-'} is allowed
 as well; for example, you can use:
 
 @example
-       ;;; -*- emacs-lisp -*-
+        ;;; -*- emacs-lisp -*-
 @end example
 
 @vindex enable-local-variables
@@ -910,7 +912,7 @@ macro with the same definition it has now.  You need not understand Lisp
 code to do this, because @code{insert-kbd-macro} writes the Lisp code for you.
 Then save the file.  You can load the file with @code{load-file}
 (@pxref{Lisp Libraries}).  If the file you save in is your initialization file
-@file{~/.emacs} (@pxref{Init File}), then the macro will be defined each
+(@pxref{Init File}), then the macro will be defined each
 time you run Emacs.
 
   If you give @code{insert-kbd-macro} a prefix argument, it creates
@@ -1025,7 +1027,7 @@ just like @key{RET}.  This is used mainly for Mocklisp compatibility.
 @code{minibuffer-local-must-match-map} is for strict completion and
 for cautious completion.
 @item
-@code{repeat-complex-command-map} is for use in @kbd{C-x @key{ESC}}.
+@code{repeat-complex-command-map} is for use in @kbd{C-x @key{ESC} @key{ESC}}.
 @item
 @code{isearch-mode-map} contains the bindings of the special keys which
 are bound in the pseudo-mode entered with @kbd{C-s} and @kbd{C-r}.
@@ -1153,7 +1155,7 @@ redefines @kbd{C-x 4 $} to run the (fictitious) command
 @findex define-key
 @findex substitute-key-definition
   The most general way to modify a keymap is the function
-@code{define-key}, used in Lisp code (such as your @file{.emacs} file).
+@code{define-key}, used in Lisp code (such as your init file).
 @code{define-key} takes three arguments: the keymap, the key to modify
 in it, and the new definition.  @xref{Init File}, for an example.
 @code{substitute-key-definition} is used similarly; it takes three
@@ -1232,13 +1234,13 @@ Here are some examples of programmatically binding keys:
 @example
 
 ;;;  Bind @code{my-command} to @key{f1}
-(global-set-key 'f1 'my-command)               
+(global-set-key 'f1 'my-command)                
 
 ;;;  Bind @code{my-command} to @kbd{Shift-f1}
 (global-set-key '(shift f1) 'my-command)
 
 ;;; Bind @code{my-command} to @kbd{C-c Shift-f1}
-(global-set-key '[(control c) (shift f1)] 'my-command) 
+(global-set-key '[(control c) (shift f1)] 'my-command)  
 
 ;;; Bind @code{my-command} to the middle mouse button.
 (global-set-key 'button2 'my-command)
@@ -1288,14 +1290,14 @@ sequences.
 After binding a command to two key sequences with a form like:
 
 @example
-       (define-key global-map "\^X\^I" 'command-1)
+        (define-key global-map "\^X\^I" 'command-1)
 @end example
 
 it is possible to redefine only one of those sequences like so:
 
 @example
-       (define-key global-map [(control x) (control i)] 'command-2)
-       (define-key global-map [(control x) tab] 'command-3)
+        (define-key global-map [(control x) (control i)] 'command-2)
+        (define-key global-map [(control x) tab] 'command-3)
 @end example
 
 This applies only when running under a window system.  If you are
@@ -1325,13 +1327,15 @@ beginning users from executing it by accident and being confused.
 
   The direct mechanism for disabling a command is to have a non-@code{nil}
 @code{disabled} property on the Lisp symbol for the command.  These
-properties are normally set by the user's @file{.emacs} file with
+properties are normally set by the user's init file with
 Lisp expressions such as:
 
 @example
 (put 'delete-region 'disabled t)
 @end example
 
+@xref{Init File}.
+
   If the value of the @code{disabled} property is a string, that string
 is included in the message printed when the command is used:
 
@@ -1342,9 +1346,9 @@ is included in the message printed when the command is used:
 
 @findex disable-command
 @findex enable-command
-  You can disable a command either by editing the @file{.emacs} file
+  You can disable a command either by editing the init file
 directly or with the command @kbd{M-x disable-command}, which edits the
-@file{.emacs} file for you.  @xref{Init File}.
+init file for you.  @xref{Init File}.
 
   When you attempt to invoke a disabled command interactively in Emacs,
 a window is displayed containing the command's name, its
@@ -1353,7 +1357,7 @@ Emacs asks for input saying whether to execute the command as requested,
 enable it and execute, or cancel it.  If you decide to enable the
 command, you are asked whether to do this permanently or just for the
 current session.  Enabling permanently works by automatically editing
-your @file{.emacs} file.  You can use @kbd{M-x enable-command} at any
+your init file.  You can use @kbd{M-x enable-command} at any
 time to enable any command permanently.
 
   Whether a command is disabled is independent of what key is used to
@@ -1530,22 +1534,23 @@ character includes both the string you have to pass to
 and some English to explain that string if necessary.
 
 @node Init File
-@section The Init File, .emacs
+@section The Init File
 @cindex init file
 @cindex Emacs initialization file
 @cindex key rebinding, permanent
 @cindex rebinding keys, permanently
 
-  When you start Emacs, it normally loads the file @file{.emacs} in your
-home directory.  This file, if it exists, should contain Lisp code.  It
-is called your initialization file or @dfn{init file}.  Use the command
-line switch @samp{-q} to tell Emacs whether to load an
-init file (@pxref{Entering Emacs}).  Use the command line switch
-@samp{-user-init-file} (@pxref{Command Switches}) to tell Emacs to load
-a different file instead of @file{~/.emacs}.
+  When you start Emacs, it normally loads either @file{.xemacs/init.el}
+or the file @file{.emacs} (whichever comes first) in your home directory.
+This file, if it exists, should contain Lisp code.  It is called your
+initialization file or @dfn{init file}.  Use the command line switch
+@samp{-q} to tell Emacs whether to load an init file (@pxref{Entering
+Emacs}).  Use the command line switch @samp{-user-init-file}
+(@pxref{Command Switches}) to tell Emacs to load a different file
+instead of @file{~/.xemacs/init.el}/@file{~/.emacs}.
 
-When the @file{.emacs} file is read, the variable @code{user-init-file}
-says which init file was loaded.
+When the init file is read, the variable @code{user-init-file} says
+which init file was loaded.
 
   At some sites there is a @dfn{default init file}, which is the
 library named @file{default.el}, found via the standard search path for
@@ -1555,10 +1560,8 @@ loaded whenever you start Emacs.  But your init file, if any, is loaded
 first; if it sets @code{inhibit-default-init} non-@code{nil}, then
 @file{default} is not loaded.
 
-  If you have a large amount of code in your @file{.emacs} file, you
-should move it into another file named @file{@var{something}.el},
-byte-compile it (@pxref{Lisp Libraries}), and load that file from your
-@file{.emacs} file using @code{load}.
+  If you have a large amount of code in your init file, you should
+byte-compile it to @file{~/.xemacs/init.elc} or @file{~/.emacs.elc}.
 
 @menu
 * Init Syntax::     Syntax of constants in Emacs Lisp.
@@ -1569,7 +1572,7 @@ byte-compile it (@pxref{Lisp Libraries}), and load that file from your
 @node Init Syntax
 @subsection Init File Syntax
 
-  The @file{.emacs} file contains one or more Lisp function call
+  The init file contains one or more Lisp function call
 expressions.  Each consists of a function name followed by
 arguments, all surrounded by parentheses.  For example, @code{(setq
 fill-column 60)} represents a call to the function @code{setq} which is
@@ -1577,7 +1580,7 @@ used to set the variable @code{fill-column} (@pxref{Filling}) to 60.
 
   The second argument to @code{setq} is an expression for the new value
 of the variable.  This can be a constant, a variable, or a function call
-expression.  In @file{.emacs}, constants are used most of the time.
+expression.  In the init file, constants are used most of the time.
 They can be:
 
 @table @asis
@@ -1811,16 +1814,16 @@ the library @file{term/aaa}.  The code in the library can use
 
 @vindex term-file-prefix
   The library's name is constructed by concatenating the value of the
-variable @code{term-file-prefix} and the terminal type.  Your @file{.emacs}
+variable @code{term-file-prefix} and the terminal type.  Your init
 file can prevent the loading of the terminal-specific library by setting
-@code{term-file-prefix} to @code{nil}.
+@code{term-file-prefix} to @code{nil}.  @xref{Init File}.
 
 @vindex term-setup-hook
   The value of the variable @code{term-setup-hook}, if not @code{nil}, is
 called as a function of no arguments at the end of Emacs initialization,
-after both your @file{.emacs} file and any terminal-specific library have
-been read.  You can set the value in the @file{.emacs} file to override
-part of any of the terminal-specific libraries and to define
+after both your init file and any terminal-specific library have been
+read.  @xref{Init File}.  You can set the value in the init file to
+override part of any of the terminal-specific libraries and to define
 initializations for terminals that do not have a library.@refill
 
 @node Audible Bell
@@ -1918,16 +1921,16 @@ The Emacs command loop catches an error
 @item undefined-key
 You type a key that is undefined
 
-@item undefined-click  
+@item undefined-click
 You use an undefined mouse-click combination
 
-@item no-completion    
+@item no-completion
 Completion was not possible
 
-@item y-or-n-p         
+@item y-or-n-p
 You type something other than the required @code{y} or @code{n}
 
-@item yes-or-no-p      
+@item yes-or-no-p       
 You type something other than @code{yes} or @code{no}
 @end table
 
@@ -2052,6 +2055,16 @@ to make underlining an attribute of the face or not. If the optional
 @var{frame} argument is provided, the face is changed only in that
 frame; otherwise, it is changed in all frames.
 
+@node Frame Components
+@section Frame Components
+
+You can control the presence and position of most frame components, such
+as the menubar, toolbars, and gutters.
+
+This section is not written yet.  Try the Lisp Reference Manual:
+@ref{Menubar,,,lispref,}, @ref{Toolbar Intro,,,lispref,}, and
+@ref{Gutter Intro,,,lispref,}.
+
 @node X Resources
 @section X Resources
 @cindex X resources
@@ -2066,7 +2079,7 @@ run both variants.
 Starting with XEmacs 21, XEmacs uses the class @samp{XEmacs} if it finds
 any XEmacs resources in the resource database when the X connection is
 initialized.  Otherwise, it will use the class @samp{Emacs} for
-backwards compatability.  The variable @var{x-emacs-application-class}
+backwards compatibility.  The variable @var{x-emacs-application-class}
 may be consulted to determine the application class being used.
 
 The examples in this section assume the application class is @samp{Emacs}.
@@ -2098,11 +2111,11 @@ Emacs*FRAME-NAME.parameter: value
 
 @menu
 * Geometry Resources::     Controlling the size and position of frames.
-* Iconic Resources::      Controlling whether frames come up iconic.
-* Resource List::         List of resources settable on a frame or device.
-* Face Resources::        Controlling faces using resources.
-* Widgets::               The widget hierarchy for XEmacs.
-* Menubar Resources::     Specifying resources for the menubar.
+* Iconic Resources::       Controlling whether frames come up iconic.
+* Resource List::          List of resources settable on a frame or device.
+* Face Resources::         Controlling faces using resources.
+* Widgets::                The widget hierarchy for XEmacs.
+* Menubar Resources::      Specifying resources for the menubar.
 @end menu
 
 @node Geometry Resources
@@ -2477,17 +2490,31 @@ XEmacs executable (usually @samp{xemacs}), and
 @subsection Menubar Resources
 
 As the menubar is implemented as a widget which is not a part of XEmacs
-proper, it does not use the fac" mechanism for specifying fonts and
+proper, it does not use the face mechanism for specifying fonts and
 colors: It uses whatever resources are appropriate to the type of widget
 which is used to implement it.
 
-If Emacs was compiled to use only the Motif-lookalike menu widgets, then one
-way to specify the font of the menubar would be
+If Emacs was compiled to use only the Lucid Motif-lookalike menu widgets,
+then one way to specify the font of the menubar would be
 
 @example
 Emacs*menubar*font: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
 @end example
 
+If both the Lucid Motif-lookalike menu widgets and X Font Sets are 
+configured to allow multilingual menubars, then one uses
+
+@example
+*menubar*FontSet:       -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*, \
+                        -*-*-*-*-*-*-*-120-*-jisx0208.1983-0
+@end example
+
+That would specify fonts for a Japanese menubar.  Specifying only one
+XLFD is acceptable; specifying more than one for a given registry
+(language) is also allowed.  When X Font Sets are configured, some .font
+resources (eg, menubars) are ignored in favor of the corresponding
+.fontSet resources.
+
 If the Motif library is being used, then one would have to use 
 
 @example