GNU bug report logs - #16346
24.3; electric-pair-mode close-paren issue

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Sun, 5 Jan 2014 02:58:02 UTC

Severity: normal

Found in version 24.3

Done: Leo Liu <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: joaotavora <at> gmail.com (João Távora)
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 16346 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: bug#16346: 24.3; electric-pair-mode close-paren issue
Date: Sun, 05 Jan 2014 19:25:32 +0000
Leo Liu <sdl.web <at> gmail.com> writes:
>> Are you sure this is only with the new features?
> Yes.

Funny, `electric-pair--insert' was also being called with the previous
`electric-pair-mode' to insert matchers and it didn't change. The
previous version did sometimes match ( didn't it? :)

> But this may break the other half of stuff using
> post-self-insert-hook?

Yes, more or less I think that was the gist of the FIXME notes that
Stefan had added there. OTOH, it's useful, for example, when newlines
are inserted. electric-indent-mode has a chance to kick in there.

Let's look at this this way, if the user pressed `(', `)' and `C-b' in
sucession, what would that "half of stuff" do? This is what
electric-pair more or less emulates.

On the other hand, we can decide to insert matchers using simple
`insert'. Stefan any thoughts?

> Add (eldoc-post-insert-mode nil) fixes this bug.

Nice, looks good, maybe you could commit this and maybe add a test or
two. I can only look at this at the end of the week, sorry.




This bug report was last modified 11 years and 137 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.