1

I would like to tell emacs to treat some keywords (or regular expressions even better) as syntactic whitespace, or, in other words, to ignore them. For example: emacs highlighting and cedet misinterpret the code

void function() some_compiler_specific_modifier(){
...
}

as some_compiler_specific_modifier being the function name.

I have a list of the modifiers so I would love it if emacs could just ignore them whenever it finds them.

EDIT: the most important part is to make the cedet parser ignore these keywords...

1 Answer 1

1

To do this, you can modify semantic-lex-c-preprocessor-symbol-map to include the symbols you want to have disappear. Since you have lots of macros, and some of those macros apparently take an argument, you are probably better off create some new header, such as:

goofy.h:

   #define some_compiler_specific_modifier(A)
   #define some_other_compiler_modifier(B)
   // ...

and then add that to semantic-lex-c-preprocessor-symbol-file.

After modifying those variables, you may need to then call semantic-c-reset-preprocessor-symbol-map to get the changes to take effect.

Alternately, use the ede-cpp-root-project type and specify the above info via the configuration in that project style. (See the doc for more on that.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.