[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: João Távora
Subject: Re: [patch] make electric-pair-mode smarter/more useful
Date: Thu, 12 Dec 2013 03:05:47 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> We could remap backward-delete-char-untabify in
> electric-pair-mode-map.

Thanks, I did that and it seems to work OK.

>>> I'm also partial to the `autopair-newline' feature. It would probably
>>> serve best as an extension of `electric-layout-mode'.
>> Yes, I agree that `electric-layout-mode' seems the place for this, but
>> how to write these rules in the existing `electric-layout-rules' var?
> Indeed, it doesn't really fit in there.  You could probably hack it in
> brute-force style by adding the newline directly from
> electric-layout-in-between-parenthesis (and then return nil rather than
> `after').

Didn't try it yet. Anyway, in latest emacs, js-mode layout rules already
have reasonable behaviour, opening newlines after when you "{" and
before them when you "}". That might be enough.

> Patch welcome.

Patch sent.

>> - additionally one should be able to customize if points ends up
>>   inside or outside the wrapped region.
> I don't see a strong need for such customization, but I wouldn't
> object.

Yeah, its overkill. Someone once requested it for autopair. Maybe I can
add it..


reply via email to

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