Bruno Sabin wrote:
> Rick, you can call the "clean" macro before saving (Esc-x clean).
> If you *need* it to be called on every single save, you will possibly
> want to create your own mini-macro (say save-clean) which will call
> "clean" and "save-buffer" and rebind the C-x C-s key (global-bind-key
> save-clean "C-x C-s").
I agree with Bruno, 'clean' is better called now an again rather than
unnecessarily on every save. My favourite is "spotless" rather than the
regular "clean" which is defined as follows:-
; spotless; Perform a clean and remove any multi-blank lines.
This removes trailing spaces and deletes multiple blank lines (2 or more
blank lines are reduced to a single blank line). You will find this in
the "jasspa/contrib/" directory in the example "user.emf" file and will
have to add it to your own macro file to use it. There is also
"super-delete" in this file which I use all of the time and am lost without.
> Rick Owen said the following on 25/08/06 16:57:
>> Is there a command (or a macro) that could trim trailing trailing
>> spaces upon file-save?