bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#38406: 27.0.50; post-self-insert-hook does not hold its contract in


From: Eli Zaretskii
Subject: bug#38406: 27.0.50; post-self-insert-hook does not hold its contract in cc-mode derived modes
Date: Fri, 06 Dec 2019 20:48:26 +0200

> Date: Fri, 6 Dec 2019 18:28:42 +0000
> Cc: yyoncho@gmail.com, 38406@debbugs.gnu.org
> From: Alan Mackenzie <acm@muc.de>
> 
> > There might be a misunderstanding on my part here.  Could you please
> > explain how come electric-pair-post-self-insert-function is called
> > twice if it isn't removed from the hook? where's the second (or the
> > first) call?
> 
> The first call is an explicit call from c-electric-brace to
> electric-pair-post-self-insert-function.  Depending on the changes to the
> buffer this call causes (amongst other things), differing electric
> actions are performed by c-electric-brace.  This call is itself a
> workaround, there being no purpose designed function for this purpose in
> elec-pair.el.
> 
> The second call happens when c-electric-brace run-hook's
> post-self-insert-hook - _if_ electric-pair-post-self-insert-function
> hasn't been filtered out of that hook.

If you already call that particular function explicitly, then calling
it one more time is indeed redundant.

But is this the case with all the other functions that you suggest to
filter from post-self-insert-hook?





reply via email to

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