User-Level Insertion Commands
=============================
This section describes higher-level commands for inserting text,
commands intended primarily for the user but useful also in Lisp
programs.
- Command: insert-buffer from-buffer-or-name
This command inserts the entire contents of FROM-BUFFER-OR-NAME
(which must exist) into the current buffer after point. It leaves
the mark after the inserted text. The value is `nil'.
- Command: self-insert-command count
This command inserts the last character typed; it does so COUNT
times, before point, and returns `nil'. Most printing characters
are bound to this command. In routine use, `self-insert-command'
is the most frequently called function in Emacs, but programs
rarely use it except to install it on a keymap.
In an interactive call, COUNT is the numeric prefix argument.
This command calls `auto-fill-function' whenever that is non-`nil'
and the character inserted is in the table `auto-fill-chars'
(Note:Auto Filling).
This command performs abbrev expansion if Abbrev mode is enabled
and the inserted character does not have word-constituent syntax.
(Note:Abbrevs, and Note:Syntax Class Table.)
This is also responsible for calling `blink-paren-function' when
the inserted character has close parenthesis syntax (Note:Blinking).
Do not try substituting your own definition of
`self-insert-command' for the standard one. The editor command
loop handles this function specially.
- Command: newline &optional number-of-newlines
This command inserts newlines into the current buffer before point.
If NUMBER-OF-NEWLINES is supplied, that many newline characters
are inserted.
This function calls `auto-fill-function' if the current column
number is greater than the value of `fill-column' and
NUMBER-OF-NEWLINES is `nil'. Typically what `auto-fill-function'
does is insert a newline; thus, the overall result in this case is
to insert two newlines at different places: one at point, and
another earlier in the line. `newline' does not auto-fill if
NUMBER-OF-NEWLINES is non-`nil'.
This command indents to the left margin if that is not zero.
Note:Margins.
The value returned is `nil'. In an interactive call, COUNT is the
numeric prefix argument.
- Command: split-line
This command splits the current line, moving the portion of the
line after point down vertically so that it is on the next line
directly below where it was before. Whitespace is inserted as
needed at the beginning of the lower line, using the `indent-to'
function. `split-line' returns the position of point.
Programs hardly ever use this function.
- Variable: overwrite-mode
This variable controls whether overwrite mode is in effect. The
value should be `overwrite-mode-textual', `overwrite-mode-binary',
or `nil'. `overwrite-mode-textual' specifies textual overwrite
mode (treats newlines and tabs specially), and
`overwrite-mode-binary' specifies binary overwrite mode (treats
newlines and tabs like any other characters).