[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#46889: cperl-mode: Fix indentation issues [PATCH]
From: |
Mattias Engdegård |
Subject: |
bug#46889: cperl-mode: Fix indentation issues [PATCH] |
Date: |
Thu, 4 Mar 2021 19:07:28 +0100 |
4 mars 2021 kl. 18.31 skrev Lars Ingebrigtsen <larsi@gnus.org>:
> I'm thinking of the rx `eval' things everywhere. Wouldn't defining
> these rx expressions with `rx-define' be more straighforward, and then
> you'd have:
`rx-define` is new in Emacs 27, and the patch was apparently intended to work
with 26.1.
>> +(defconst cperl-maybe-white-and-comment-rex
>> + (rx-to-string `(group cperl--ws*-rx))
>
> (Similarly for basically all the rx `eval' bits.
>
> Now, rx expands the `eval' at compile time, I think, so it doesn't
> really make that much difference in practice, but it seems slightly
> clearer, perhaps?
Even in Emacs 26, there are several more or less equivalent ways of expressing
the same thing. I'm sure it will be fine.
A minor detail -- ignore it if you like -- is that some backquote forms now no
longer have any substitutions (, or ,@) and could therefore be plain quoted
forms. Or, if you prefer, you could keep the backquotes and use
comma-substitution instead of `eval` instead of mixing the two. It may also be
a good idea to use `rx` instead of `rx-to-string` in some places to ensure that
the translation is done at compile time instead of when the module is loaded.
bug#46889: cperl-mode: Fix indentation issues [PATCH], Harald Jörg, 2021/03/04
bug#46889: cperl-mode: Fix indentation issues [PATCH], Harald Jörg, 2021/03/09
bug#46889: cperl-mode: Fix indentation issues [PATCH], Harald Jörg, 2021/03/09