The code indentation engine in Emacs works with "syntactic symbols". When you type code in emacs type "C-c C-s". The minibuffer will show the syntactic symbol near point. Now type "C-c C-o" this will ask for a syntactic symbol that you want to customize (By default it shows the one near point). Here you can select the number of spaces Emacs should use to indent this particular syntactic symbol.
For ex:-
main()
{ /* type C-c C-s here, minibuffer will show defun-open, typing C-c C-o now
will allow you to set the number of spaces Emacs should insert for a brace
starting a function definition */
PS:- A point means the position at which the cursor is in.
No comments:
Post a Comment