[EMAIL PROTECTED] wrote on Fri, 15 Apr 2005 11:06:02 +0200:

> Hi,
> is there a smart way to replace all tabs with 3 spaces in a buffer edited
> in c-mode
> (both comments and code lines)

Yes, but that might not be what you really want.  Assuming you've got
tab-width set to 3, a tab extends to the next column which is a multiple
of 3.  So if you had this in a buffer

a<tab>b

it would look like this:

a  b

If you replaced the tab with three spaces, you'd end up with this

a   b.

I suggest you do this:  C-x h  (to mark the entire buffer) followed by
M-x untabify.

> Thank you very much.

And the best of luck!

-- 
Alan Mackenzie (Munich, Germany)
Email: [EMAIL PROTECTED]; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to