Surely deleteing superflous spaces is just a matter of M-x
delete-trailing-whitespace, which you learn about under the Display, Trailing
whitespace. It operates in the whoole buffer so hit C-x n n (narrow to region)
if you want to restrict it to an area of a buffer, and C-x n w (widen) when you
want to see the rest of the buffer again. This is not cc-mode specific. You
could also get the same effect with a regex-replace.

Incidently the indent-region menu item and command can be reach via C-M-\
(which is bound to indent-region). I think it operates in most major modes
where such an operation makes sense. You can also convert spaces to tabs and
spaces in the region with M-x tabify and revert to just spaces with M-x
untabify, neither of which can cc mode specific.

A feature you might not be aware of is using M-q is for formatting multiple
line comments. I guess a lot of people have also discovered VC mode too. Given
all the above it is any suprise I am hopelessly addicted to emacs for all major
editing :-)

-- 
Duncan (-:
"software industry, the: unique industry where selling substandard goods is
legal and you can charge extra for fixing the problems."


Reply via email to