unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: robert.thorpe@antenova.com
Subject: Re: what confuse me is ...
Date: 14 Sep 2006 08:21:48 -0700	[thread overview]
Message-ID: <1158247308.610920.315590@e3g2000cwe.googlegroups.com> (raw)
In-Reply-To: <ee9prt$h3q$1@news.yaako.com>

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.

  reply	other threads:[~2006-09-14 15:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-13 15:04 c-set-style question jronald
2006-09-13 16:47 ` David Hansen
2006-09-13 17:04 ` robert.thorpe
2006-09-13 20:31 ` what confuse me is jronald
2006-09-14 15:21   ` robert.thorpe [this message]
2006-09-14 18:31     ` Helpful, thans jronald

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1158247308.610920.315590@e3g2000cwe.googlegroups.com \
    --to=robert.thorpe@antenova.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).