Indent openmp directives as C/C++ code in emacs
问题 In a previous question, I learned how to indent macros as regular C code on emacs. I just need this because of #pragma omp directives from OpenMP, but I'd like to maintain all other kind of macros, like #if and #endif , indented as the default. (c-set-offset (quote cpp-macro) 0 nil) The rule above treats all macros as the same. My question is: Is there a way to specialize this rule? 回答1: If you look at M-x describe-variable c-offsets-alist , which defines a list of variables that represent