On Tuesday 19 March 2002 11:05 pm, Duncan Simpson wrote: > 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 :-)
Hmpf. I think it's a conspiracy! I have just upgraded to emacs 20.7 and these are the only commands apropos "whitespace": delete-whitespace-rectangle M-x delete-whitespace-rectangle RET Command: Delete all whitespace following a specified column in each line. fixup-whitespace M-x fixup-whitespace RET Command: Fixup white space between objects around point. isearch-whitespace-chars M-x isearch-whitespace-chars RET Command: Match all whitespace chars, if in regexp mode. Could someone dig out the little bit of lisp for delete-trailing-whitespace and tell me which file to put it in. Regards, Angus