[EMAIL PROTECTED] wrote on 3 Mar 2005 12:58:13 -0800: > How do I customize Emacs so that when editing a C++ file the > indentation of for loops, etc., will be 3 spaces instead of the default > of 2 spaces?
> We have GNU emacs version 21.2.1 A default of 2 spaces? UURRRRKKKK!!! How horrible! The variable you need to change is c-basic-offset, and it's documented in the CC Mode manual on the page "Customizing Indentation". How you would go about setting it is on the page "Sample .emacs File". First, why not check through your .emacs and find if it's getting set to 2 there? If so, just change it. Otherwise put something like this into your .emacs: (defun prab-c++-hook () (setq c-basic-offset 3)) (add-hook 'c++-mode-hook 'prab-c++-hook) (_Don't_ forget the two quote marks in that last line.) > We have GNU emacs version 21.2.1 -- 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