all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* The grand indentation unification project
@ 2012-05-26 19:45 Daniel Hackney
  2012-05-26 20:05 ` Glenn Morris
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Hackney @ 2012-05-26 19:45 UTC (permalink / raw)
  To: emacs-devel

While working on adding configurable lisp paths to package.el, I noticed
that many whitespace-only changes were created, cluttering up the diffs.
It would make patches smaller and more focused if there were a single
whitespace style applied throughout all of the elisp sources. This
doesn't mean radically changing things; but rather applying the current
style throughout. From what I see, the current source has
`indent-tabs-mode' non-nil and a `tab-width' of 8 and mostly sticks to
this formula.

There are some places where it deviates from this style, such as using 8
spaces rather than a tab for indentation in some parts, having a space
before a tab, or a single-semicolon comment at column 1. `indent-region'
does not catch all of these, especially indentation using 8 spaces
rather than a tab (because `indent-to' specifically avoids changing
spaces to tabs if there are the right number of spaces).

I propose adding to the `emacs-lisp-mode' section of ".dir-locals.el" in
the source root `(indent-tabs-mode . t)' and a definition for
`whitespace-style' to use tabs for indentation. Then, when committing
changes, the buffer would be run through `indent-region' and
`whitespace-cleanup'. This would ensure whitespace consistency for all
files in the repo and prevent diff conflicts which consist entirely of
whitespace changes.

As an extra guarantee of consistency, use "emacs -Q" when re-indenting
files so that no user customizations can change the indentation.

--
Daniel M. Hackney



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

end of thread, other threads:[~2012-05-28  5:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-26 19:45 The grand indentation unification project Daniel Hackney
2012-05-26 20:05 ` Glenn Morris
2012-05-27  9:28   ` Juri Linkov
2012-05-27 14:42   ` Daniel Hackney
2012-05-27 17:13     ` Miles Bader
2012-05-27 17:32       ` Daniel Hackney
2012-05-28  5:12         ` Stefan Monnier

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.