From: luca.pamparana@gmail.com
To: help-gnu-emacs@gnu.org
Subject: Re: having problems with indentation in c++-mode
Date: Sun, 8 Feb 2009 03:06:49 -0800 (PST) [thread overview]
Message-ID: <642d6c84-e50a-47cd-8341-7fb02f6ebce1@x38g2000yqj.googlegroups.com> (raw)
In-Reply-To: gmm7d5$2g4q$1@colin2.muc.de
On Feb 8, 10:07 am, Alan Mackenzie <a...@muc.de> wrote:
> luca.pampar...@gmail.com wrote:
> > Hello everyone,
> > I would like to set the indentation level to 4 characters and I am
> > having trouble achieving this in the c++-mode. I have looked on the
> > web and used the most common template that is found but the smart
> > indentation always indents at 2 spaces...no matter what I set the tab-
> > width or the indent level.
>
> [ .... ]
>
> > I can set the tab-width or the indent-level to whatever number but it
> > does not help. It always indents at 2 spaces.
>
> > I am an emacs newbie, so I am sure I have missed something basic. I
> > would be grateful for any help you might give me.
>
> The magic document is the CC Mode manual, chapter "Getting Started".
>
> The variable you need to set is `c-basic-offset'. Here's what this fine
> manual says:
>
> c-basic-offset
> This Lisp variable holds an integer, the number of columns CC Mode
> indents nested code. To set this value to 6, customize
> `c-basic-offset' or put this into your `.emacs':
>
> (setq c-basic-offset 6)
>
> If you can't get this working, come back again.
>
> Best of luck!
>
> > Cheers,
> > Luca
>
> --
> Alan Mackenzie (Nuremberg, Germany).
That works. You are awesome!
Thanks,
Luca
next prev parent reply other threads:[~2009-02-08 11:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-07 20:07 having problems with indentation in c++-mode luca.pamparana
2009-02-08 9:07 ` Alan Mackenzie
2009-02-08 11:06 ` luca.pamparana [this message]
2009-02-08 14:18 ` Richard Riley
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=642d6c84-e50a-47cd-8341-7fb02f6ebce1@x38g2000yqj.googlegroups.com \
--to=luca.pamparana@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.