Specific indentatiom

Discussion of Emacs Lisp
Post Reply
whandler

Specific indentatiom

Post by whandler » Fri Feb 06, 2009 8:08 am

Hi all

I have a large body of code to work with, emacs being the common editor. The company that wrote the code suite has their own preprocessor they run that has some functions that start with an @ symbol that should not be indented. It looks like this

int function() {
code;
@special
morecode;
}
@special2

Basically, all the @ commands, that are processed by the preprocessor they wrote to make c code cannot be indented.

I turned on the c style indentation and syntax highlighting in my .emacs file, but would like the code to indent the preproceesor lines, which do not end witha semi colon, properly.

Would anyone have any suggestions on how to do this with emacs?

Thanks

Will

omouse
Posts: 3
Joined: Tue Sep 08, 2009 5:08 pm

Re: Specific indentatiom

Post by omouse » Tue Sep 08, 2009 5:16 pm

I think to properly indent things, you would need to redefine a regular-expression somewhere that is used to define lines or words. I'm not sure exactly which variables the indentation-function uses.

Post Reply