[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to set c-set-style at startup?

From: Jai Dayal
Subject: Re: how to set c-set-style at startup?
Date: Wed, 20 Jul 2011 10:12:01 -0600

  Thanks for your help!  I tried that, and for indentation style, it displayed "gnu".  I didn't see any errors in the Messages list.

From here:

I found this:

    (setq c-default-style "linux"
c-basic-offset 4)

That seemed to work for me.  I have emacs 23.3.1.  Anyways, you set me on the right track.

Thank you!

On Wed, Jul 20, 2011 at 1:15 AM, Peter Münster <address@hidden> wrote:
On Wed, Jul 20 2011, Jai Dayal wrote:

> I tried this, but it doesn't seem to be working.

Example? Emacs-version?

This works for me:

emacs -Q
M-: (add-hook 'c-mode-hook '(lambda () (c-set-style "linux")))
open "foo.c"
C-h v c-indentation-style
-> result = "linux"

> For example, I change the
> style to the style I have in the code below, and the indentation will be
> different.

To be expected, isn't it?

> I can also put in garbage instead of "linux" and no errors occur. 

I get "Undefined style: garbage" in the *Messages* buffer.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]