GNU bug report logs -
#16346
24.3; electric-pair-mode close-paren issue
Previous Next
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
Message #8 received at 16346 <at> debbugs.gnu.org (full text, mbox):
Leo Liu <sdl.web <at> 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.
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.