[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16346: 24.3; electric-pair-mode close-paren issue
From: |
João Távora |
Subject: |
bug#16346: 24.3; electric-pair-mode close-paren issue |
Date: |
Sun, 05 Jan 2014 11:49:34 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Leo Liu <sdl.web@gmail.com> writes:
> In some of the eldoc-documentation-function's when used by
> eldoc-post-insert-mode, for example octave-eldoc-function, the eldoc
> (calltip) is only shown after inserting the ( and inside the ().
>
> The new feature introduced to electric-pair-mode fails the above by
> triggering two successive runs of post-self-insert-hook, one for
> inserting the open-paren and the other for the close-paren. Thus the
> eldoc message is immediately cleared by the second run.
Are you sure this is only with the new features?
> 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.
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.
- bug#16346: 24.3; electric-pair-mode close-paren issue, Leo Liu, 2014/01/04
- bug#16346: 24.3; electric-pair-mode close-paren issue,
João Távora <=
- bug#16346: 24.3; electric-pair-mode close-paren issue, Leo Liu, 2014/01/05
- bug#16346: 24.3; electric-pair-mode close-paren issue, João Távora, 2014/01/05
- bug#16346: 24.3; electric-pair-mode close-paren issue, Stefan Monnier, 2014/01/05
- bug#16346: 24.3; electric-pair-mode close-paren issue, Leo Liu, 2014/01/05
- bug#16346: 24.3; electric-pair-mode close-paren issue, Stefan Monnier, 2014/01/09
- bug#16346: 24.3; electric-pair-mode close-paren issue, Leo Liu, 2014/01/09
- bug#16346: 24.3; electric-pair-mode close-paren issue, Leo Liu, 2014/01/09
- bug#16346: 24.3; electric-pair-mode close-paren issue, Stefan Monnier, 2014/01/10
- bug#16346: 24.3; electric-pair-mode close-paren issue, Leo Liu, 2014/01/10
- bug#16346: 24.3; electric-pair-mode close-paren issue, Stefan Monnier, 2014/01/10