bug-gettext
[Top][All Lists]
Advanced

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

Re: [PATCH] po-mode.el: fontification improvements and more


From: Bruno Haible
Subject: Re: [PATCH] po-mode.el: fontification improvements and more
Date: Fri, 14 Jul 2023 23:30:06 +0200

Hello Eliza,

> I have written a series of patches to po-mode.el which I think are
> useful.

Great! I appreciate your contributions.

> Regarding the copyright assignment, I sent in my paperwork a while ago
> and am still waiting for the response from the FSF.  I can follow up
> with them.

The paperwork can take up to two weeks in normal cases. If you are without
answer for longer than that, yes, following up is a good idea.

> I was really shocked at how
> this package was so meticulously kept compatible non-GNU Emacs and
> really old versions of GNU Emacs for all these years.  But it does make
> it difficult to add new features like this (and especially the following
> feature).  IMHO I think that the package is probably due for a refactor
> targeting a minimum version of maybe GNU Emacs 24 at the earliest.

You can see in the git log that I removed support for XEmacs in 2019.
Are there other non-GNU Emacs versions worth considering?

Also in 2019, I removed support for Emacs versions < 22, because
   "Emacs 22 is the oldest version still in use, see
    <https://repology.org/project/emacs/versions>."

>From this URL, you can see that Emacs 23 is the minimum one can assume
today. It's the version present in RHEL 6, which is still supported
until 2024-06-30. [1]

> 1.  Add support for `:local t' in `defcustom'.
> 
> Simple and necessary for the other patches.

>From which Emacs version is this 'defcustom :local t' supported?

> 2.  Make the trailing "<" terminator a configurable, optional feature.
> 
> It's certainly useful in some cases, but most of the time in the kinds
> of translations I work on, it's not necessary and interferes with some
> normal text editing workflows.

OK, if you feel so, fine with me.

> 3.  Add support for editing the msgstr in a configurable major mode
>     other than `text-mode'.
> 
> This is really useful for translating something with heavy markup usage,
> for example, HTML or Markdown.  Even C format strings could probably
> benefit from this, assuming there's a major mode for it...

OK. I can't really judge this.

> One potential issue with this change is that I replaced the usage of
> `use-local-map' with the minor mode keybinding mechanism.  I don't know
> if this is compatible with non-GNU Emacs.

I don't think we worry about non-GNU Emacs here any more; see above.

> 4.  Add support for fontification of msgids and msgstrs based on the
>     configurable major mode introduced above.
> 
> This is the most significant patch out of the four and by far the most
> likely to break compatibility with very old/non-GNU Emacs.

Then it needs to be tested. For testing with old versions, there are
essentially two possibilities:
  - Use an old distro in a VM; see the link above
    <https://repology.org/project/emacs/versions>.
  - Install older versions of GNU Emacs from source. I used the attached
    command script for doing so.

> The end result, when dealing with
> markup-heavy code, makes it a lot easier to catch mistakes/discrepancies
> between formatting of the msgid and the msgstr.

That's definitely useful!

> I would like feedback about the implementation and compatibility concerns.

I can't give guidance about Emacs internals; for that, you would have to ask
on some Emacs mailing list.

Just as a matter of code style, please quote like 'this', not like `this'. [2]

Best,

          Bruno

[1] 
https://git.savannah.gnu.org/gitweb/?p=gnulib/maint-tools.git;a=blob;f=end-of-life.txt
[2] https://www.gnu.org/prep/standards/html_node/Quote-Characters.html

Attachment: configure64-emacs
Description: Text document


reply via email to

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