Subject: bug#62536: 30.0.50; Can we add """ ... """ electric pair in elixir, just like python

From: João Távora <[email-masked]>
Date: Wed, 5 Apr 2023 14:09:34 +0100

On Tue, Apr 4, 2023 at 9:34 PM Wilhelm Kirschbaum <[email-masked]> wrote:
>
>
> >> And in electric-layout-rules you _can_, I think, identify
> >> triple quotes using a function as described in the last
> >> paragraph of its docstring.
> >>
> > Yes, I tested this earlier and it does work.
> >
>
> Even though it works, it does not play nice with the custom psif,
> because the layout rules seems to trigger before the hook.

You should be able to adjust the order of the functions
in post-self-insert-hook.  The core psifs of electric-pair-mode,
electric-indent-mode and electric-layout-mode coordinate their
action in this way, as it's very common to reach situations
as you describe.  Use a numeric third argument to add-hook
to coordinate.  Assume that the numbers you see in elec-pair.el
and electric.el for the core psifs will be relatively unchanged.

If you have the latest code you're testing, I can help you test,
as I've just installed the tree-sitter grammar for elixir-ts-mode
and it seems to be working.

João