[Top][All Lists]

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

Re: [patch] make electric-pair-mode smarter/more useful

From: Stefan Monnier
Subject: Re: [patch] make electric-pair-mode smarter/more useful
Date: Thu, 12 Dec 2013 11:30:53 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> I don't think this is sufficient: what if I want to type a one-line function
> or object literal (say, an empty one)? Or an empty for, while or catch body?
> I'd have to remove the added newline(s) and whitespace in each
> such instance.

As explained, electric-layout-mode is directly inspired from cc-mode's
corresponding feature.  In C modes and friends, you rarely (if ever)
write "{ }", so there was no need for such a thing.

> I'd much prefer a workflow where electric-layout-mode doesn't do anything
> until I press Return, and then does the autopair-newline thing if point is
> directly between two parens.

I think it makes sense.  I'd welcome an extension of
electric-layout-mode which provides such a functionality.


reply via email to

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