我又来问问题了。。。
在头文件中我们常常有这样的定义,但是在我这产生了如下的问题:
#ifndef ONCE_MACRO // warning: unterminated conditional directive
#define ONCE_MACRO
#ifdef __cplusplus // warning: unterminated conditional directive
extern "C" { // warning: expected indentifier of '('
#endif // warning: #endif without #if
something indent I don't want to.
#ifdef __cplusplus
}
#endif
#endif // warning: #endif without #if
实际上文件本身是没问题的,但是在emacs里表现如上所示,我觉得大概是3个问题:
-
extern “C”
这里不是特别正常。 -
#if
和#endif
对不上了,感觉像是问题1导致的。 - 由于
extern "C"
的大括号影响了中间内容的缩进距离,我理想的状态是这种情况不产生缩进。
请问有人遇到类似的问题吗?应该从哪里着手?emacs的新手,目前还没有搞明白怎么把emacs用起来,有一点点入门无路的感觉。。。