找回密码
 注册
查看: 682|回复: 2

debian中的emacs设置问题

[复制链接]
发表于 2003-8-9 13:59:52 | 显示全部楼层 |阅读模式
如何设置emacs的语法高亮和linux内核代码式的缩进格式?
用了很长时间的vi,现在想换emacs试试
发表于 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.
回复

使用道具 举报

 楼主| 发表于 2003-8-9 19:16:16 | 显示全部楼层
xie xie le
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2025-2-12 00:07 , Processed in 0.020632 second(s), 15 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表