|
From: Jeroen N. W. <jn...@xs...> - 2005-10-29 07:22:58
|
Greetings, Are there any standards or guidelines on where to indent, and by how much, in Valgrind's source code? Can anybody tell me how to instruct emacs to implement these standards or guidelines? Thanks. Jeroen. |
|
From: Julian S. <js...@ac...> - 2005-10-29 12:36:31
|
It's pretty much as you see. The 3-space indent seems to be pretty good for readability. I'm pretty clueless with emacs and have always found its alternative ideas of indentation a pain, so when it's done inserting tabs and generally messing around, I reindent it by hand, getting rid of tabs and inserting spaces instead. J On Saturday 29 October 2005 08:22, Jeroen N. Witmond wrote: > Greetings, > > Are there any standards or guidelines on where to indent, and by how much, > in Valgrind's source code? Can anybody tell me how to instruct emacs to > implement these standards or guidelines? > > Thanks. > > Jeroen. > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through End of 2005 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers |
|
From: Nicholas N. <nj...@cs...> - 2005-10-29 15:37:08
|
On Sat, 29 Oct 2005, Julian Seward wrote: > It's pretty much as you see. The 3-space indent seems to be > pretty good for readability. I'm pretty clueless with emacs and > have always found its alternative ideas of indentation a pain, > so when it's done inserting tabs and generally messing around, > I reindent it by hand, getting rid of tabs and inserting spaces > instead. We have a lot of tabs, unfortunately, as well. They are 8 spaces. Nick |
|
From: Greg P. <gp...@us...> - 2005-10-29 18:34:15
|
Julian Seward writes:
> It's pretty much as you see. The 3-space indent seems to be
> pretty good for readability. I'm pretty clueless with emacs and
> have always found its alternative ideas of indentation a pain,
> so when it's done inserting tabs and generally messing around,
> I reindent it by hand, getting rid of tabs and inserting spaces
> instead.
Add this to your .emacs file:
(add-hook 'c-mode-common-hook
#'(lambda ()
;; Use 3 space indent by default
(setq c-basic-offset 3)
;; Never insert tab characters when indenting
(setq indent-tabs-mode nil)
)
)
There's also `M-x untabify`, which changes all tab characters to
spaces in the current selection.
I use four-space indent by default, so I set up a command that
switches between three and four when I'm working on Valgrind sources.
--
Greg Parker gp...@us...
|
|
From: Nicholas N. <nj...@cs...> - 2005-11-01 16:47:16
|
On Sat, 29 Oct 2005, Greg Parker wrote: > Add this to your .emacs file: > > (add-hook 'c-mode-common-hook > #'(lambda () > ;; Use 3 space indent by default > (setq c-basic-offset 3) > ;; Never insert tab characters when indenting > (setq indent-tabs-mode nil) > ) > ) > > There's also `M-x untabify`, which changes all tab characters to > spaces in the current selection. Or if you use Vim: set tabstop=8 softtabstop=3 shiftwidth=3 expandtab Nick |