[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Electric indentation sub-optimality and resolution

From: John Yates
Subject: Re: Electric indentation sub-optimality and resolution
Date: Thu, 18 Dec 2014 19:43:12 -0500

On Thu, Dec 18, 2014 at 3:07 PM, Dmitry Gutov <address@hidden> wrote:
Personally, I like this lighter-weight approach:


In my case I have show-trailing-whitespace set and my trailing-whitespace face is "red3".  That made it very painful to insert blank lines in the presence of cc-mode's new electric indentation, even when some other mechanism / package / mode ultimately was going to clean things up (assuming I saved the file).  Until I did a save my new electric whitespace messes were "in my face".

Steve Purcell's approach works only if one's file is pristine.  Prior to the introduction of electric indentation I had no need of such a package: I was careful not to introduce inappropriate whitespace.  But since I regularly have to work on files where other people have been less fastidious Steve's package would not clean these electric whitespace messes.

I actually really like the behavior of the code I posted.  It has an added small bonus.  Normally it does not cleanup pre-existing whitespace.  When I modify a line with trailing whitespace it does cleanup that one line, something my projects' guidelines allow.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]