This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Specific indentatiom

2 posts · 3438 views

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

Re: Specific indentatiom

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.