emacs-devel
[Top][All Lists]
Advanced

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

Re: electric-pair-mode as a minor mode?


From: Stefan Monnier
Subject: Re: electric-pair-mode as a minor mode?
Date: Fri, 27 Mar 2015 09:25:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>>> When editing regular text, as opposed to code, I also occasionally
>>> switch it off because I find it distracting.
>> I'm pretty sure that can be done fairly easily, by fixing a few
>> concrete cases.

> Can you name some?

I know that I regularly find myself deleting closing parens in
text-modes because I typed (...) and the closing paren inserted when
I hit the "(" is not skipped when I hit the ")".

It's probably because of something in the context, but you can't assume
that parens are properly balanced in text mode.

Here's one concrete example I bumped into earlier today:

   this is a sad example :-(
   I just wanted to type foo ())

The double close paren was due to electric-pair-mode not skipping the
first close-paren when I hit ")", because it took the sad smiley as an
open paren.


        Stefan



reply via email to

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