From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: gratuitous changes Date: Fri, 31 Jan 2003 21:11:04 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20030201021104.GA25915@gnu.org> References: <200301312148.h0VLmG128712@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1044065439 27711 80.91.224.249 (1 Feb 2003 02:10:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 1 Feb 2003 02:10:39 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18en76-0007Cn-00 for ; Sat, 01 Feb 2003 03:10:36 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18enDW-00072y-00 for ; Sat, 01 Feb 2003 03:17:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18en8k-0003NP-00 for emacs-devel@quimby.gnus.org; Fri, 31 Jan 2003 21:12:18 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18en8G-0002p7-00 for emacs-devel@gnu.org; Fri, 31 Jan 2003 21:11:48 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18en7m-0001mc-00 for emacs-devel@gnu.org; Fri, 31 Jan 2003 21:11:21 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18en7Z-00013M-00 for emacs-devel@gnu.org; Fri, 31 Jan 2003 21:11:05 -0500 Original-Received: from miles by fencepost.gnu.org with local (Exim 4.10) id 18en7Y-00078j-00; Fri, 31 Jan 2003 21:11:04 -0500 Original-To: Stefan Monnier Content-Disposition: inline In-Reply-To: <200301312148.h0VLmG128712@rum.cs.yale.edu> User-Agent: Mutt/1.3.28i Blat: Foop X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11270 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11270 On Fri, Jan 31, 2003 at 04:48:16PM -0500, Stefan Monnier wrote: > But I still think that what happened with keyboard.c is bad: > turning every whitespace-only line into an empty line. This is > bad because hitting TAB somewhere or calling indent-region on > a piece of code will re-introduce those spaces, so we end up > with never ending spurious conflicts. This is not true -- indent-region will not add spaces to an empty line, at least in C or lisp code (it seems to try to preserve whitespace exactly, which is obviously good for the sort of reason you give in your message). In fact, emacs indentation commands in general seem to try to delete spaces from empty lines when possible, e.g., C-j on an empty line filled with spaces will remove the spaces before inserting a newline and indenting the new line, and indent-rigidly will remove spaces from empty lines. The exception seems to be cases where it's expected that you will immediately add text to the line, such as TAB, or C-j. As I expect most people won't randomly hit TAB on empty lines, I don't think this should be a problem. > Please be careful when you commit changes. Those of us who have > extensive locally modified files (i.e. uncomitted changes) > will be grateful for it. This, OTOH, is very true. I think it's OK to `fix' whitespace issues if they occur immediately adjacent to a change you're already making, but otherwise it can be quite annoying for people maintaing patches or CVS branches. In particular, it's a bad idea to blindly use `delete-trailing-whitespace' (e.g. in write-file-hooks) on files you're going to check in. -Miles -- 97% of everything is grunge