[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: what confuse me is ...
From: |
robert . thorpe |
Subject: |
Re: what confuse me is ... |
Date: |
14 Sep 2006 08:21:48 -0700 |
User-agent: |
G2/1.0 |
jronald wrote:
> By consulting c-default-style in emacs's doc,
> it says:
>
> c-default-style's value is
> ((java-mode . "java")
> (other . "gnu"))
>
> but I'm editing a .cpp file.
c-default-style is a CC mode variable. CC mode deals with all
langauges that are similar to C, such as Java, C++, C, and lots of
other obscure langs. When you see "c-mode" in a buffer it means that
you're using a C mode that is internally part of CC-mode.
As a result this variable can have values for every one of these
programming languages. For example, you can do:-
(setq c-default-style "k&r") ;; Use kernigham & ritchie style for
everything
or specifying different styles for each mode that CC-mode controls..
(setq c-default-style '((java-mode . "java") (c-mode . "gnu") (other .
"whitesmith")))
I think the name is rather confusing, it probably should be changed.