GNU bug report logs - #64275
30.0.50; [PATCH] Improve sigil font-lock match for elixir-ts-mode

Previous Next

Package: emacs;

Reported by: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>

Date: Sat, 24 Jun 2023 20:18:02 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Done: Dmitry Gutov <dmitry <at> gutov.dev>

Bug is archived. No further changes may be made.

Full log


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

From: Wilhelm Kirschbaum <wkirschbaum <at> gmail.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>
Cc: Basil Contovounesios <contovob <at> tcd.ie>, 64275 <at> debbugs.gnu.org
Subject: Re: bug#64275: 30.0.50;
 [PATCH] Improve sigil font-lock match for elixir-ts-mode
Date: Sat, 21 Oct 2023 09:39:38 +0200
[Message part 1 (text/plain, inline)]
> >>>
> >>> I'm not sure what you meant by the last sentence, sorry. What
> >>> do
> >>> you
> >>> think about the below?
> >>>
> >>>   (sigil (sigil_name) @elixir-ts-font-sigil-name-face)
> >>>   @font-lock-string-face)
> >>
> >> Sorry for the late reply.  I believe the following patch is
> >> more
> >> appropriate as it will apply the sigil font to the entire
> >> sigil, but
> >> also respect the regex face.  We can add string specific
> >> matches
> >> later,
> >> but happy just to simplify what we have and fix apply
> >> appropriate
> >> font
> >> to previously unmatched sigils.
> >>
> >> [2. text/x-patch;
> >> 0001-Simplify-sigil-font-lock-match-for-elixir-ts-mode.patch]...
> >
> > Actually, the above patch breaks the embedded HEEx sigils'
> > font. We
> > have to exclude it when doing a general match.  Attached works
> > with ~H
> > sigils as well.  Please ignore the previous patch and install
> > this
> > one.
> >
> > [2. text/x-patch;
> > 0001-Simplify-sigil-font-lock-match-for-elixir-ts-mode(1).patch]...
>
>
> Sorry :(. I am finding more edge cases.  Maybe let me test it this
> properly this week before we make any changes.
>

I tested this patch for a while now and it looks like the best approach
for handling regex sigils, but with an appropriate fallback.

If this can be installed, it will be appreciated.
[Message part 2 (text/html, inline)]
[0001-Simplify-sigil-font-lock-match-for-elixir-ts-mode.patch (text/x-patch, attachment)]

This bug report was last modified 1 year and 206 days ago.

Previous Next


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