GNU Emacs Lisp Reference Manual
This section describes higher-level commands for deleting text, commands intended primarily for the user but useful also in Lisp programs.
nil.
In the following examples, we call delete-horizontal-space four
times, once on each line, with point between the second and third
characters on the line each time.
---------- Buffer: foo ----------
I -!-thought
I -!- thought
We-!- thought
Yo-!-u thought
---------- Buffer: foo ----------
(delete-horizontal-space) ; Four times.
=> nil
---------- Buffer: foo ----------
Ithought
Ithought
Wethought
You thought
---------- Buffer: foo ----------
nil,
delete-indentation joins this line to the following line
instead. The value is nil.
If there is a fill prefix, and the second of the lines being joined
starts with the prefix, then delete-indentation deletes the
fill prefix before joining the lines. See Margins.
In the example below, point is located on the line starting
events, and it makes no difference if there are trailing spaces
in the preceding line.
---------- Buffer: foo ---------- When in the course of human -!- events, it becomes necessary ---------- Buffer: foo ----------(delete-indentation) => nil
---------- Buffer: foo ---------- When in the course of human-!- events, it becomes necessary ---------- Buffer: foo ----------
After the lines are joined, the function fixup-whitespace is
responsible for deciding whether to leave a space at the junction.
nil.
At the beginning or end of a line, the appropriate amount of space is none. Before a character with close parenthesis syntax, or after a character with open parenthesis or expression-prefix syntax, no space is also appropriate. Otherwise, one space is appropriate. See Syntax Class Table.
In the example below, fixup-whitespace is called the first time
with point before the word spaces in the first line. For the
second invocation, point is directly after the (.
---------- Buffer: foo ----------
This has too many -!-spaces
This has too many spaces at the start of (-!- this list)
---------- Buffer: foo ----------
(fixup-whitespace)
=> nil
(fixup-whitespace)
=> nil
---------- Buffer: foo ----------
This has too many spaces
This has too many spaces at the start of (this list)
---------- Buffer: foo ----------
nil.
A blank line is defined as a line containing only tabs and spaces.
delete-blank-lines returns nil.