[Top][All Lists]

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

Re: Electric indentation (Was: Re: js.el changes)

From: Lennart Borgman
Subject: Re: Electric indentation (Was: Re: js.el changes)
Date: Fri, 21 Aug 2009 18:22:58 +0200

On Fri, Aug 21, 2009 at 6:18 PM, Daniel Colascione<address@hidden> wrote:
> On Friday 14 August 2009, you wrote:
>> 4. I removed the "electric indentation" feature implemented by
>> js-auto-indent-flag and js-insert-and-indent.  I appreciate the intent,
>> but it's not consistent with the way the other programming modes work,
>> and this behavior should be implemented separately---as a minor mode
>> that can be used generally.  Feel free to suggest this on emacs-devel.
> I agree that a generic toggle switch for electric indentation would be nice. 
> However, there's quite a bit of precedent for modes implementing their own 
> electric indentation, often using complex logic (see c-electric-brace).
> To me, the simplest option would be to create a new trivial minor mode, 
> electric-indentation-mode, and modify all current mode-specific indentation 
> code to check that mode's flag instead of relying on something mode-specific 
> like js-auto-indent-flag or c-electric-flag. The actual mode-specific 
> indentation can survive otherwise unchanged.

Maybe it could be done similar to indent-line-function etc?

reply via email to

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