GNU bug report logs - #62536
30.0.50; Can we add """ ... """ electric pair in elixir, just like python

Previous Next

Package: emacs;

Reported by: 牟 桐 <mou.tong <at> outlook.com>

Date: Thu, 30 Mar 2023 04:31:02 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #80 received at 62536 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 62536 <at> debbugs.gnu.org, mou.tong <at> outlook.com
Subject: Re: bug#62536: 30.0.50; Can we add """ ... """ electric pair in
 elixir, just like python
Date: Wed, 5 Apr 2023 14:09:34 +0100
On Tue, Apr 4, 2023 at 9:34 PM Wilhelm Kirschbaum <wkirschbaum <at> gmail.com> 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




This bug report was last modified 2 years and 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.