clean removes redundant white spaces from the current buffer, there are three types this command remove:
Any space or tab character at the end of the line. All are removed until the last character is not a space or a tab, or the line is empty. Note that an empty line is not removed unless at the end of the buffer.
Space characters are removed when the next character is a tab, making the space redundant, e.g. the strings " Hello World" and " Hello World" will look identical because the tab character (' ') indents the text to the 8th column with or without the space so the space can be removed.
Superfluous empty lines at the end of the buffer are removed, leaving only one empty line.
If argument n is given (value is not used) multiple blank lines are reduced to a single blank line.
clean is a macro defined in format.emf.
Most of this command's operation is performed by simple regex search and replace strings:
Search for: "[\t ]+$" Replace with: "\\0"
Search for: "[ ]+\t" Replace with: "\t"
Search for: "\n\n\n" Replace with: "\n\n"
It is useful to define a new command called spotless in the user macro file which cleans the file and removes blank lines. The new command is defined as follows:-
; spotless; Perform a clean and remove any multi-blank lines.
Copyright (c) 1998-2006 JASSPA
Last Modified: 2004/01/11
Generated On: 2006/10/07