|
发表于 2003-8-9 15:48:18
|
显示全部楼层
语法高亮在菜单里面设置
代码缩进形式在进入c模式后用C-c . linux <RET>
也可一在.emacs里面加入
(add-to-list 'c-default-style (c-mode . "linux"))
Built-in Styles
---------------
If you're lucky, one of CC Mode's built-in styles might be just what
you're looking for. These include:
* `gnu' -- Coding style blessed by the Free Software Foundation for
C code in GNU programs.
* `k&r' -- The classic Kernighan and Ritchie style for C code.
* `bsd' -- Also known as "Allman style" after Eric Allman.
* `whitesmith' -- Popularized by the examples that came with
Whitesmiths C, an early commercial C compiler.
* `stroustrup' -- The classic Stroustrup style for C++ code.
* `ellemtel' -- Popular C++ coding standards as defined by
"Programming in C++, Rules and Recommendations," Erik Nyquist and
Mats Henricson, Ellemtel(1).
* `linux' -- C coding standard for Linux (the kernel).
* `python' -- C coding standard for Python extension modules(2).
* `java' -- The style for editing Java code. Note that the default
value for `c-default-style' installs this style when you enter
`java-mode'.
* `user' -- This is a special style for several reasons. First, the
CC Mode customizations you do by using either the Customization
interface, or by writing `setq''s at the top level of your
`.emacs' file, will be captured in the `user' style. Also, all
other styles implicitly inherit their settings from `user' style.
This means that for any styles you add via `c-add-style' (*note
Adding Styles: you need only define the differences between your
new style and `user' style. |
|