Sync with r21-2-35.
[chise/xemacs-chise.git-] / info / xemacs.info-17
index beafba4..8326642 100644 (file)
@@ -30,6 +30,99 @@ versions, except that the sections entitled "The GNU Manifesto",
 translation approved by the author instead of in the original English.
 
 \1f
+File: xemacs.info,  Node: Save Kbd Macro,  Next: Kbd Macro Query,  Prev: Basic Kbd Macro,  Up: Keyboard Macros
+
+Naming and Saving Keyboard Macros
+---------------------------------
+
+   To save a keyboard macro for longer than until you define the next
+one, you must give it a name using `M-x name-last-kbd-macro'.  This
+reads a name as an argument using the minibuffer and defines that name
+to execute the macro.  The macro name is a Lisp symbol, and defining it
+in this way makes it a valid command name for calling with `M-x' or for
+binding a key to with `global-set-key' (*note Keymaps::).  If you
+specify a name that has a prior definition other than another keyboard
+macro, Emacs prints an error message and nothing is changed.
+
+   Once a macro has a command name, you can save its definition in a
+file.  You can then use it in another editing session.  First visit the
+file you want to save the definition in.  Then use the command:
+
+     M-x insert-kbd-macro <RET> MACRONAME <RET>
+
+This inserts some Lisp code that, when executed later, will define the
+same macro with the same definition it has now.  You need not
+understand Lisp code to do this, because `insert-kbd-macro' writes the
+Lisp code for you.  Then save the file.  You can load the file with
+`load-file' (*note Lisp Libraries::).  If the file you save in is your
+initialization file (*note Init File::), then the macro will be defined
+each time you run Emacs.
+
+   If you give `insert-kbd-macro' a prefix argument, it creates
+additional Lisp code to record the keys (if any) that you have bound to
+the keyboard macro, so that the macro is reassigned the same keys when
+you load the file.
+
+\1f
+File: xemacs.info,  Node: Kbd Macro Query,  Prev: Save Kbd Macro,  Up: Keyboard Macros
+
+Executing Macros With Variations
+--------------------------------
+
+   You can use `C-x q' (`kbd-macro-query'), to get an effect similar to
+that of `query-replace'.  The macro asks you  each time whether to make
+a change.  When you are defining the macro, type `C-x q' at the point
+where you want the query to occur.  During macro definition, the `C-x
+q' does nothing, but when you invoke the macro, `C-x q' reads a
+character from the terminal to decide whether to continue.
+
+   The special answers to a `C-x q' query are <SPC>, <DEL>, `C-d',
+`C-l', and `C-r'.  Any other character terminates execution of the
+keyboard macro and is then read as a command.  <SPC> means to continue.
+<DEL> means to skip the remainder of this repetition of the macro,
+starting again from the beginning in the next repetition.  `C-d' means
+to skip the remainder of this repetition and cancel further repetition.
+`C-l' redraws the frame and asks you again for a character to specify
+what to do.  `C-r' enters a recursive editing level, in which you can
+perform editing that is not part of the macro.  When you exit the
+recursive edit using `C-M-c', you are asked again how to continue with
+the keyboard macro.  If you type a <SPC> at this time, the rest of the
+macro definition is executed.  It is up to you to leave point and the
+text in a state such that the rest of the macro will do what you want.
+
+   `C-u C-x q', which is `C-x q' with a numeric argument, performs a
+different function.  It enters a recursive edit reading input from the
+keyboard, both when you type it during the definition of the macro and
+when it is executed from the macro.  During definition, the editing you
+do inside the recursive edit does not become part of the macro.  During
+macro execution, the recursive edit gives you a chance to do some
+particularized editing.  *Note Recursive Edit::.
+
+\1f
+File: xemacs.info,  Node: Key Bindings,  Next: Syntax,  Prev: Keyboard Macros,  Up: Customization
+
+Customizing Key Bindings
+========================
+
+   This section deals with the "keymaps" that define the bindings
+between keys and functions, and shows how you can customize these
+bindings.
+
+   A command is a Lisp function whose definition provides for
+interactive use.  Like every Lisp function, a command has a function
+name, which is a Lisp symbol whose name usually consists of lower case
+letters and hyphens.
+
+* Menu:
+
+* Keymaps::    Definition of the keymap data structure.
+               Names of Emacs's standard keymaps.
+* Rebinding::  How to redefine one key's meaning conveniently.
+* Disabling::  Disabling a command means confirmation is required
+                before it can be executed.  This is done to protect
+                beginners from surprises.
+
+\1f
 File: xemacs.info,  Node: Keymaps,  Next: Rebinding,  Up: Key Bindings
 
 Keymaps
@@ -175,9 +268,9 @@ redefines `C-x 4 $' to run the (fictitious) command
 `spell-other-window'.
 
    The most general way to modify a keymap is the function
-`define-key', used in Lisp code (such as your `.emacs' file).
-`define-key' takes three arguments: the keymap, the key to modify in
-it, and the new definition.  *Note Init File::, for an example.
+`define-key', used in Lisp code (such as your init file).  `define-key'
+takes three arguments: the keymap, the key to modify in it, and the new
+definition.  *Note Init File::, for an example.
 `substitute-key-definition' is used similarly; it takes three
 arguments, an old definition, a new definition, and a keymap, and
 redefines in that keymap all keys that were previously defined with the
@@ -323,20 +416,22 @@ beginning users from executing it by accident and being confused.
 
    The direct mechanism for disabling a command is to have a non-`nil'
 `disabled' property on the Lisp symbol for the command.  These
-properties are normally set by the user's `.emacs' file with Lisp
+properties are normally set by the user's init file with Lisp
 expressions such as:
 
      (put 'delete-region 'disabled t)
 
+   *Note Init File::.
+
    If the value of the `disabled' property is a string, that string is
 included in the message printed when the command is used:
 
      (put 'delete-region 'disabled
           "Text deleted this way cannot be yanked back!\n")
 
-   You can disable a command either by editing the `.emacs' file
-directly or with the command `M-x disable-command', which edits the
-`.emacs' file for you.  *Note Init File::.
+   You can disable a command either by editing the init file directly
+or with the command `M-x disable-command', which edits the init file
+for you.  *Note Init File::.
 
    When you attempt to invoke a disabled command interactively in Emacs,
 a window is displayed containing the command's name, its documentation,
@@ -344,7 +439,7 @@ and some instructions on what to do next; then 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 `.emacs' file.
+Enabling permanently works by automatically editing your init file.
 You can use `M-x enable-command' at any time to enable any command
 permanently.
 
@@ -537,19 +632,20 @@ some English to explain that string if necessary.
 \1f
 File: xemacs.info,  Node: Init File,  Next: Audible Bell,  Prev: Syntax,  Up: Customization
 
-The Init File, .emacs
-=====================
+The Init File
+=============
 
-   When you start Emacs, it normally loads the file `.emacs' in your
-home directory.  This file, if it exists, should contain Lisp code.  It
-is called your initialization file or "init file".  Use the command
-line switch `-q' to tell Emacs whether to load an init file (*note
-Entering Emacs::).  Use the command line switch `-user-init-file'
-(*note Command Switches::) to tell Emacs to load a different file
-instead of `~/.emacs'.
+   When you start Emacs, it normally loads either `.xemacs/init.el' or
+the 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 "init file".  Use the command line switch `-q'
+to tell Emacs whether to load an init file (*note Entering Emacs::).
+Use the command line switch `-user-init-file' (*note Command
+Switches::) to tell Emacs to load a different file instead of
+`~/.xemacs/init.el'/`~/.emacs'.
 
-   When the `.emacs' file is read, the variable `user-init-file' says
-which init file was loaded.
+   When the init file is read, the variable `user-init-file' says which
+init file was loaded.
 
    At some sites there is a "default init file", which is the library
 named `default.el', found via the standard search path for libraries.
@@ -559,10 +655,8 @@ whenever you start Emacs.  But your init file, if any, is loaded first;
 if it sets `inhibit-default-init' non-`nil', then `default' is not
 loaded.
 
-   If you have a large amount of code in your `.emacs' file, you should
-move it into another file named `SOMETHING.el', byte-compile it (*note
-Lisp Libraries::), and load that file from your `.emacs' file using
-`load'.
+   If you have a large amount of code in your init file, you should
+byte-compile it to `~/.xemacs/init.elc' or `~/.emacs.elc'.
 
 * Menu:
 
@@ -576,16 +670,16 @@ File: xemacs.info,  Node: Init Syntax,  Next: Init Examples,  Up: Init File
 Init File Syntax
 ----------------
 
-   The `.emacs' file contains one or more Lisp function call
-expressions.  Each consists of a function name followed by arguments,
-all surrounded by parentheses.  For example, `(setq fill-column 60)'
-represents a call to the function `setq' which is used to set the
-variable `fill-column' (*note Filling::) to 60.
+   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, `(setq fill-column 60)' represents a call
+to the function `setq' which is used to set the variable `fill-column'
+(*note Filling::) to 60.
 
    The second argument to `setq' is an expression for the new value of
 the variable.  This can be a constant, a variable, or a function call
-expression.  In `.emacs', constants are used most of the time.  They
-can be:
+expression.  In the init file, constants are used most of the time.
+They can be:
 
 Numbers
      Integers are written in decimal, with an optional initial minus
@@ -777,16 +871,16 @@ Thus, terminal types `aaa-48' and `aaa-30-rv' both use the library
 the full terminal type name.
 
    The library's name is constructed by concatenating the value of the
-variable `term-file-prefix' and the terminal type.  Your `.emacs' file
-can prevent the loading of the terminal-specific library by setting
-`term-file-prefix' to `nil'.
+variable `term-file-prefix' and the terminal type.  Your init file can
+prevent the loading of the terminal-specific library by setting
+`term-file-prefix' to `nil'.  *Note Init File::.
 
    The value of the variable `term-setup-hook', if not `nil', is called
 as a function of no arguments at the end of Emacs initialization, after
-both your `.emacs' file and any terminal-specific library have been
-read.  You can set the value in the `.emacs' file to override part of
-any of the terminal-specific libraries and to define initializations
-for terminals that do not have a library.
+both your init file and any terminal-specific library have been read.
+*Note 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.
 
 \1f
 File: xemacs.info,  Node: Audible Bell,  Next: Faces,  Prev: Init File,  Up: Customization
@@ -1135,148 +1229,3 @@ to the first frame created regardless of its name.  However, it is
 possible to set the iconic flag on particular frames (by name) by using
 the `Emacs*FRAME-NAME.iconic' resource.
 
-\1f
-File: xemacs.info,  Node: Resource List,  Next: Face Resources,  Prev: Iconic Resources,  Up: X Resources
-
-Resource List
--------------
-
-   Emacs frames accept the following resources:
-
-`geometry' (class `Geometry'): string
-     Initial geometry for the frame.  *Note Geometry Resources::, for a
-     complete discussion of how this works.
-
-`iconic' (class `Iconic'): boolean
-     Whether this frame should appear in the iconified state.
-
-`internalBorderWidth' (class `InternalBorderWidth'): int
-     How many blank pixels to leave between the text and the edge of the
-     window.
-
-`interline' (class `Interline'): int
-     How many pixels to leave between each line (may not be
-     implemented).
-
-`menubar' (class `Menubar'): boolean
-     Whether newly-created frames should initially have a menubar.  Set
-     to true by default.
-
-`initiallyUnmapped' (class `InitiallyUnmapped'): boolean
-     Whether XEmacs should leave the initial frame unmapped when it
-     starts up.  This is useful if you are starting XEmacs as a server
-     (e.g. in conjunction with gnuserv or the external client widget).
-     You can also control this with the `-unmapped' command-line option.
-
-`barCursor' (class `BarColor'): boolean
-     Whether the cursor should be displayed as a bar, or the
-     traditional box.
-
-`cursorColor' (class `CursorColor'): color-name
-     The color of the text cursor.
-
-`scrollBarWidth' (class `ScrollBarWidth'): integer
-     How wide the vertical scrollbars should be, in pixels; 0 means no
-     vertical scrollbars.  You can also use a resource specification of
-     the form `*scrollbar.width', or the usual toolkit scrollbar
-     resources: `*XmScrollBar.width' (Motif), `*XlwScrollBar.width'
-     (Lucid), or `*Scrollbar.thickness' (Athena).  We don't recommend
-     that you use the toolkit resources, though, because they're
-     dependent on how exactly your particular build of XEmacs was
-     configured.
-
-`scrollBarHeight' (class `ScrollBarHeight'): integer
-     How high the horizontal scrollbars should be, in pixels; 0 means no
-     horizontal scrollbars.  You can also use a resource specification
-     of the form `*scrollbar.height', or the usual toolkit scrollbar
-     resources: `*XmScrollBar.height' (Motif), `*XlwScrollBar.height'
-     (Lucid), or `*Scrollbar.thickness' (Athena).  We don't recommend
-     that you use the toolkit resources, though, because they're
-     dependent on how exactly your particular build of XEmacs was
-     configured.
-
-`scrollBarPlacement' (class `ScrollBarPlacement'): string
-     Where the horizontal and vertical scrollbars should be positioned.
-     This should be one of the four strings `BOTTOM_LEFT',
-     `BOTTOM_RIGHT', `TOP_LEFT', and `TOP_RIGHT'.  Default is
-     `BOTTOM_RIGHT' for the Motif and Lucid scrollbars and
-     `BOTTOM_LEFT' for the Athena scrollbars.
-
-`topToolBarHeight' (class `TopToolBarHeight'): integer
-`bottomToolBarHeight' (class `BottomToolBarHeight'): integer
-`leftToolBarWidth' (class `LeftToolBarWidth'): integer
-`rightToolBarWidth' (class `RightToolBarWidth'): integer
-     Height and width of the four possible toolbars.
-
-`topToolBarShadowColor' (class `TopToolBarShadowColor'): color-name
-`bottomToolBarShadowColor' (class `BottomToolBarShadowColor'): color-name
-     Color of the top and bottom shadows for the toolbars.  NOTE: These
-     resources do _not_ have anything to do with the top and bottom
-     toolbars (i.e. the toolbars at the top and bottom of the frame)!
-     Rather, they affect the top and bottom shadows around the edges of
-     all four kinds of toolbars.
-
-`topToolBarShadowPixmap' (class `TopToolBarShadowPixmap'): pixmap-name
-`bottomToolBarShadowPixmap' (class `BottomToolBarShadowPixmap'): pixmap-name
-     Pixmap of the top and bottom shadows for the toolbars.  If set,
-     these resources override the corresponding color resources. NOTE:
-     These resources do _not_ have anything to do with the top and
-     bottom toolbars (i.e. the toolbars at the top and bottom of the
-     frame)!  Rather, they affect the top and bottom shadows around the
-     edges of all four kinds of toolbars.
-
-`toolBarShadowThickness' (class `ToolBarShadowThickness'): integer
-     Thickness of the shadows around the toolbars, in pixels.
-
-`visualBell' (class `VisualBell'): boolean
-     Whether XEmacs should flash the screen rather than making an
-     audible beep.
-
-`bellVolume' (class `BellVolume'): integer
-     Volume of the audible beep.
-
-`useBackingStore' (class `UseBackingStore'): boolean
-     Whether XEmacs should set the backing-store attribute of the X
-     windows it creates.  This increases the memory usage of the X
-     server but decreases the amount of X traffic necessary to update
-     the screen, and is useful when the connection to the X server goes
-     over a low-bandwidth line such as a modem connection.
-
-   Emacs devices accept the following resources:
-
-`textPointer' (class `Cursor'): cursor-name
-     The cursor to use when the mouse is over text.  This resource is
-     used to initialize the variable `x-pointer-shape'.
-
-`selectionPointer' (class `Cursor'): cursor-name
-     The cursor to use when the mouse is over a selectable text region
-     (an extent with the `highlight' property; for example, an Info
-     cross-reference).  This resource is used to initialize the variable
-     `x-selection-pointer-shape'.
-
-`spacePointer' (class `Cursor'): cursor-name
-     The cursor to use when the mouse is over a blank space in a buffer
-     (that is, after the end of a line or after the end-of-file).  This
-     resource is used to initialize the variable
-     `x-nontext-pointer-shape'.
-
-`modeLinePointer' (class `Cursor'): cursor-name
-     The cursor to use when the mouse is over a modeline.  This
-     resource is used to initialize the variable `x-mode-pointer-shape'.
-
-`gcPointer' (class `Cursor'): cursor-name
-     The cursor to display when a garbage-collection is in progress.
-     This resource is used to initialize the variable
-     `x-gc-pointer-shape'.
-
-`scrollbarPointer' (class `Cursor'): cursor-name
-     The cursor to use when the mouse is over the scrollbar.  This
-     resource is used to initialize the variable
-     `x-scrollbar-pointer-shape'.
-
-`pointerColor' (class `Foreground'): color-name
-`pointerBackground' (class `Background'): color-name
-     The foreground and background colors of the mouse cursor.  These
-     resources are used to initialize the variables
-     `x-pointer-foreground-color' and `x-pointer-background-color'.
-