From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Hackney Newsgroups: gmane.emacs.devel Subject: The grand indentation unification project Date: Sat, 26 May 2012 15:45:47 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: dough.gmane.org 1338061580 14064 80.91.229.3 (26 May 2012 19:46:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 26 May 2012 19:46:20 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 26 21:46:19 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SYMwL-0006Ur-9t for ged-emacs-devel@m.gmane.org; Sat, 26 May 2012 21:46:17 +0200 Original-Received: from localhost ([::1]:46249 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYMwK-0003RQ-SW for ged-emacs-devel@m.gmane.org; Sat, 26 May 2012 15:46:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYMwH-0003R8-Ip for emacs-devel@gnu.org; Sat, 26 May 2012 15:46:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SYMwF-0001Jf-M6 for emacs-devel@gnu.org; Sat, 26 May 2012 15:46:13 -0400 Original-Received: from mail-wg0-f49.google.com ([74.125.82.49]:34266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYMwF-0001Hl-6b for emacs-devel@gnu.org; Sat, 26 May 2012 15:46:11 -0400 Original-Received: by wgbds1 with SMTP id ds1so1447413wgb.30 for ; Sat, 26 May 2012 12:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=haxney.org; s=google; h=mime-version:from:date:message-id:subject:to:content-type; bh=dOclTsNCb9KXf7Bx06c32P4k7dH3dLrfxgmZI2SUcJ0=; b=Y9V/93brMMf7/b0u08JHaSrW88cGcs0g+V2sFV2kqdcnSMEmvijQ6Qe/K8n5WDLkSs AtO+A7tgHNN5IK9F3FHlpaQPuQGJcedXVEA6xKNyKySoX3AnM60k+DEZULDUK6RrOrAt +gJWTDl0tU67fdvKBgriEPXIWMv0nIiM+WVaw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type :x-gm-message-state; bh=dOclTsNCb9KXf7Bx06c32P4k7dH3dLrfxgmZI2SUcJ0=; b=ZbHe6QX6broxPmdb7Nmq0vY7gLynvltb0PJwAh09dH8ppMsxbWSUFjuVl4x8RVVRsu 1I1fUgb8gFhaDye82S9tZAo0EKElwyRtGPibA5JbovOhgLqdSvsfA/cOjSqs8c1+05KJ foZdxusVWU6xLY79KVDBujT3id++iyAVSitLJ25OUZWCe3zHmecUBJPC9i2XSzmFKEai BN6+3N6Q3EQZpkieLwZcRVgC0aU2N2Nhz1nnC03VXSdvXfCcg5B84AeQMtBv99XJU4h1 ChDpW0yxOAAxTg0PNlEtHcj68e2mgdE0Ys1LnNmXI7oBiD6o0ONryGH98HLkBkN+qZAB NIhw== Original-Received: by 10.216.143.148 with SMTP id l20mr1772587wej.115.1338061567852; Sat, 26 May 2012 12:46:07 -0700 (PDT) Original-Received: by 10.180.87.167 with HTTP; Sat, 26 May 2012 12:45:47 -0700 (PDT) X-Gm-Message-State: ALoCoQned4bX13LqZoGVg0MwNHuV7KDCFc6paFqRtcP3nQ2JOwHwIQgn5oDQBEYm6ceJMojB+F/1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.49 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150651 Archived-At: 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