all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* changing default indent for C++
@ 2003-02-09 23:57 exits funnel
  0 siblings, 0 replies; 4+ messages in thread
From: exits funnel @ 2003-02-09 23:57 UTC (permalink / raw)


Hello,

I'm a new Emacs user.  I'm using it primarily to write
c++/Java on RedHat Linux.  So far I love it though
there is one thing which annoys me.  The default
indentation is four spaces.  I'd desparately like to
change it to two.  Learning LIST is on my todo list
but in the mean time, How can I do this?  Thanks in
advance.

-exits

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: changing default indent for C++
       [not found] <mailman.1704.1044835041.21513.help-gnu-emacs@gnu.org>
@ 2003-02-10  4:42 ` Jonathon Isaac Swiderski
  2003-02-10  6:41   ` Kai Großjohann
  2003-02-10  6:38 ` Kai Großjohann
  1 sibling, 1 reply; 4+ messages in thread
From: Jonathon Isaac Swiderski @ 2003-02-10  4:42 UTC (permalink / raw)


On Sun, 9 Feb 2003, exits funnel wrote:

> The default indentation is four spaces.  I'd desparately like to change
> it to two.

Funny, i thought it was 8, which is why I have a command to change it to 4.
But I digress.

I have it set from M-x customize, so I'm not entirely sure how to set it
directly in your .emacs; you can, however, do the following:

M-x customize-variable RET tab-width RET

and set it how you like.  The result looks something like:

(custom-set-variables '(tab-width 4))

> Learning LIST is on my todo list

I believe you mean LISP :)
(which does, in fact, stand for LISt Processor, but that's a few inches to
one side of the point. . .)

-- 
Jonathon Isaac Swiderski \\ dangercat-20@dangercat.net
www.umich.edu/~jonswid    \\ umich.edu/~jonswid/resume

A closed mouth gathers no foot.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: changing default indent for C++
       [not found] <mailman.1704.1044835041.21513.help-gnu-emacs@gnu.org>
  2003-02-10  4:42 ` Jonathon Isaac Swiderski
@ 2003-02-10  6:38 ` Kai Großjohann
  1 sibling, 0 replies; 4+ messages in thread
From: Kai Großjohann @ 2003-02-10  6:38 UTC (permalink / raw)


exits funnel <exitsfunnel@yahoo.com> writes:

> I'm a new Emacs user.  I'm using it primarily to write c++/Java on
> RedHat Linux.  So far I love it though there is one thing which
> annoys me.  The default indentation is four spaces.  I'd desparately
> like to change it to two.  Learning LIST is on my todo list but in
> the mean time, How can I do this?  Thanks in advance.

(defun ef-c-setup ()
  (setq c-basic-offset 2))
(add-hook 'c-mode-hook 'ef-c-setup)
(add-hook 'c++-mode-hook 'ef-c-setup)

The above does it for C and C++ -- I'm sure you can do Java yourself.
-- 
A turnip curses Elvis

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: changing default indent for C++
  2003-02-10  4:42 ` Jonathon Isaac Swiderski
@ 2003-02-10  6:41   ` Kai Großjohann
  0 siblings, 0 replies; 4+ messages in thread
From: Kai Großjohann @ 2003-02-10  6:41 UTC (permalink / raw)


Jonathon Isaac Swiderski <jonswid@umich.edu> writes:

> On Sun, 9 Feb 2003, exits funnel wrote:
>
>> The default indentation is four spaces.  I'd desparately like to change
>> it to two.
>
> Funny, i thought it was 8, which is why I have a command to change it to 4.
> But I digress.
>
> I have it set from M-x customize, so I'm not entirely sure how to set it
> directly in your .emacs; you can, however, do the following:
>
> M-x customize-variable RET tab-width RET

The variable tab-width does not change the behavior of the TAB key,
it just changes the way the tab characters look.

It goes like this: user hits TAB.  Major mode determines number of
columns to indent, based on syntactic indentation.  Variable
indent-tabs-mode determines whether tab characters are used at all.
If so, variable tab-width determines how many tabs are necessary to
reach the specified column.
-- 
A turnip curses Elvis

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-02-10  6:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-09 23:57 changing default indent for C++ exits funnel
     [not found] <mailman.1704.1044835041.21513.help-gnu-emacs@gnu.org>
2003-02-10  4:42 ` Jonathon Isaac Swiderski
2003-02-10  6:41   ` Kai Großjohann
2003-02-10  6:38 ` Kai Großjohann

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.