all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Liu <sdl.web@gmail.com>
To: joaotavora@gmail.com (João Távora)
Cc: 16346@debbugs.gnu.org
Subject: bug#16346: 24.3; electric-pair-mode close-paren issue
Date: Sun, 05 Jan 2014 23:30:47 +0800	[thread overview]
Message-ID: <m1wqiexx7c.fsf@gmail.com> (raw)
In-Reply-To: <878uuuy7g1.fsf@gmail.com> ("João Távora"'s message of "Sun, 05 Jan 2014 11:49:34 +0000")

On 2014-01-05 19:49 +0800, João Távora wrote:
> Are you sure this is only with the new features?

Yes.

>> My impression is if a user didn't type ) it should not trigger
>> post-self-insert-hook. WDYT?
>
> The idea of inserting matchers with
> self-insert-command is to allow other hooks to run recursively, but it
> has some problems as described by the FIXME's that I found before my
> changes electric-pair-mode.

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

> Indeed, it wasn't "self inserted" it, it was "electric
> inserted". electric-pair--insert is this abstraction and it's used to
> insert matchers. It does some rebinding of vars to keep other modes like
> blink-matching-paren from interfering. Maybe eldoc-mode deserves a place
> in there?
>
>    (defun electric-pair--insert (char)
>      (let ((last-command-event char)
>            (blink-matching-paren nil)
>            (electric-pair-mode nil)
>            (eldoc-mode nil))
>        (self-insert-command 1)))
>
> Haven't tested though... Will have little time the coming weeks, sorry.

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

Leo





  reply	other threads:[~2014-01-05 15:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-05  2:57 bug#16346: 24.3; electric-pair-mode close-paren issue Leo Liu
2014-01-05 11:49 ` João Távora
2014-01-05 15:30   ` Leo Liu [this message]
2014-01-05 19:25     ` João Távora
2014-01-05 23:13     ` Stefan Monnier
2014-01-06  0:48       ` Leo Liu
2014-01-09 16:12         ` Stefan Monnier
2014-01-10  3:24           ` Leo Liu
2014-01-10  4:11             ` Leo Liu
2014-01-10 14:14             ` Stefan Monnier
2014-01-10 16:46               ` Leo Liu
2014-01-10 17:20                 ` Stefan Monnier
2014-01-11  4:38                   ` Leo Liu
2014-01-11  5:35                     ` Stefan Monnier
2014-01-11  6:11                       ` Leo Liu
2014-01-12  3:35                         ` Stefan Monnier
2014-01-12  4:21                           ` Leo Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1wqiexx7c.fsf@gmail.com \
    --to=sdl.web@gmail.com \
    --cc=16346@debbugs.gnu.org \
    --cc=joaotavora@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.