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
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
@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
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.
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
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
@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
@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)
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
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:
@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
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
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
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.
@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
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
@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
@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
@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
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}.
@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
@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