bug-gettext
[Top][All Lists]
Advanced

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

[PATCH] po-mode.el: Raise minimum Emacs version to 23.1


From: Eliza Velasquez
Subject: [PATCH] po-mode.el: Raise minimum Emacs version to 23.1
Date: Sat, 15 Jul 2023 03:49:47 -0700

Hello bug-gettext,

As a follow-up (or maybe more accurately, a leader-up) to the
fontification patch I submitted recently, I did some cleaning up of
po-mode.el to raise its minimum version requirement to 23.1, the latest
version of Emacs supported by CentOS/RHEL 6.  In addition, I made a
second patch to address all of the extant byte compiler/flymake warnings
and lints.  I have tested these patches both in a CentOS 6 VM running
Emacs 23.1.1 and my ordinary Emacs 29 setup with some of my own
translations, but I would feel safer if a second person could try it out
as well.

The first patch does primarily two things: Firstly, it removes the
unnecessary compatibility functions, some of the small bits of inline
compatibility checks, etc.  This included the entire removal of
po-compat.el.  Secondly, it introduces a compatibility function
'po--defvar-local' and uses this to explicitly define buffer-local
variables, replacing almost all occurrences of the (set
(make-local-variable 'foo) 'bar) pattern with (setq foo 'bar) where
possible.  I took care to make sure that this was only done for
variables which are explicitly marked as buffer-local when set.  This
brings it more in line with how modern Emacs packages are written.

As mentioned above, the second patch silences (nearly) all byte compiler
warnings.  There is one remaining false positive with regard to the
wording of a docstring, and two remaining warnings about the use of an
obsolete function for which no alternative exists in Emacs 23.  Most of
the lints were complaints about the way docstrings were formatted.

Future work here might involve enabling lexical binding when the minimum
version is raised to Emacs 24.

Attachment: 0001-po-mode.el-Update-minimum-version-to-Emacs-23.patch
Description: Text Data

Attachment: 0002-po-mode.el-Fix-flymake-byte-compiler-warnings.patch
Description: Text Data

-- 
Eliza

reply via email to

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