all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Indenting in C++ Mode
@ 2005-02-28 15:39 Peter Rochford
  2005-02-28 16:31 ` August
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Rochford @ 2005-02-28 15:39 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 430 bytes --]

Dear GNU Help,
 
How do I customize Emacs so that when editing a C++ file the indentation
of for loops, etc., will be 3 spaces instead of the default of 2 spaces?

 
Thank you. 
 
Sincerely,
Dr. Peter Rochford
 
Principal Scientist
Spectral Sciences Inc.
4 Fourth Avenue
Burlington, MA 01803-3304
Voice:  781-273-4775 x223
Fax:    781-270-1161
Receptionist: 781-273-4770
URL:  <http://www.spectral.com/> http://www.spectral.com
 

[-- Attachment #1.2: Type: text/html, Size: 2034 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: Indenting in C++ Mode
  2005-02-28 15:39 Indenting in C++ Mode Peter Rochford
@ 2005-02-28 16:31 ` August
  0 siblings, 0 replies; 3+ messages in thread
From: August @ 2005-02-28 16:31 UTC (permalink / raw)


On mån, 2005-02-28 at 10:39 -0500, Peter Rochford wrote:
> Dear GNU Help,
>  
> How do I customize Emacs so that when editing a C++ file the
> indentation of for loops, etc., will be 3 spaces instead of the
> default of 2 spaces? 

Add the line

(add-hook 'c++-mode-hook '(lambda () (setq c-basic-offset 3)))

to your `~/.emacs'.

-- 
August

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

* Re: Indenting in C++ Mode
       [not found] <mailman.2007.1109607712.32256.help-gnu-emacs@gnu.org>
@ 2005-03-01 15:43 ` David Hansen
  0 siblings, 0 replies; 3+ messages in thread
From: David Hansen @ 2005-03-01 15:43 UTC (permalink / raw)


On Mon, 28 Feb 2005 10:39:53 -0500 Peter Rochford wrote:

> How do I customize Emacs so that when editing a C++ file the
> indentation of for loops, etc., will be 3 spaces instead of the
> default of 2 spaces?

(setq c-basic-offset 3)

David

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

end of thread, other threads:[~2005-03-01 15:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-28 15:39 Indenting in C++ Mode Peter Rochford
2005-02-28 16:31 ` August
     [not found] <mailman.2007.1109607712.32256.help-gnu-emacs@gnu.org>
2005-03-01 15:43 ` David Hansen

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.