]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Restore syntax highlighting in Emacs 30 or newer.
authorBruno Haible <bruno@clisp.org>
Thu, 2 Oct 2025 20:50:11 +0000 (22:50 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 2 Oct 2025 20:50:11 +0000 (22:50 +0200)
Reported by Sab Pyrope <sab.pyrope@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2025-03/msg00017.html>
and by Julien Palard <julien@palard.fr> in
<https://lists.gnu.org/archive/html/bug-gettext/2025-10/msg00000.html>.

It's a regression in Emacs 30, in commit
17e26cf57e18c5df2172a7049591d89fc53b3fb6 .

* gettext-tools/emacs/HACKING: Document how to bisect Emacs regressions.
* gettext-tools/emacs/po-mode.el (po-mode-version-string): Bump to 2.31.
(po-mode): Invoke run-mode-hooks instead of run-hooks.
* NEWS: Mention the fix.

NEWS
gettext-tools/emacs/HACKING
gettext-tools/emacs/po-mode.el

diff --git a/NEWS b/NEWS
index 235284577fd70dc08a271945b8563262dfd26707..518b2a957cf5b32e43f1acde3228973150db9778 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-Version 0.27 - September 2025
+Version 0.27 - October 2025
 
 # Programming languages support:
   * OCaml:
@@ -21,6 +21,9 @@ Version 0.27 - September 2025
       po_message_sticky_flags_iterator, po_flag_next, po_flag_iterator_free
     can be used to manipulate or inspect the sticky flags of a messsage.
 
+# Emacs PO mode:
+  Restore syntax highlighting in Emacs version 30 or newer.
+
 Version 0.26 - July 2025
 
 # Programming languages support:
index 8ee4330a5e6af96ccb56631bf6e49f240c35192b..d02a3be7d8295f4cc22622f1021538007c2dfda2 100644 (file)
@@ -1,3 +1,6 @@
+WARNING
+=======
+
 This directory gets automatically mirrored at
 
   https://github.com/emacsmirror/po-mode/
@@ -10,3 +13,37 @@ https://github.com/melpa/melpa/blob/master/README.md ):
   (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
 
 Therefore, don't make untested changes in this directory!
+
+
+Testing
+=======
+
+Testing changes done in this directory:
+
+/some/bin/emacs -q -l `pwd`/start-po.el -l `pwd`/po-mode.el ~/clisp.de.po
+
+
+Fixing bugs due to regressions in Emacs
+=======================================
+
+* Look in the Emacs NEWS file.
+
+* Bisect from one release to the next. Example:
+
+version=20230801; git checkout deb8b933bce29f99c90f5f305d0d1b75c6d27527        OK
+<Add intermediate versions here.>
+version=20250223; git checkout 8334a9bd73f01a714ba352a49b1f040264ed4eac        KO
+
+Commands:
+
+- Build:
+./autogen.sh; mkdir bb$version; cd bb$version; PKG_CONFIG_PATH=/arch/x86_64-linux-gnu/gnu/lib/pkgconfig ../configure --host=x86_64-pc-linux-gnu --prefix=/arch/x86_64-linux-gnu/gnu-inst-emacs-nox/$version CPPFLAGS=-Wall --disable-silent-rules --without-x --without-toolkit-scroll-bars --with-gif=ifavailable --with-gnutls=ifavailable && make && make install
+
+- Test that version:
+/arch/x86_64-linux-gnu/gnu-inst-emacs-nox/$version/bin/emacs -q -l /GETTEXT/gettext/gettext-tools/emacs/start-po.el -l /GETTEXT/gettext/gettext-tools/emacs/po-mode.el ~/clisp.de.po
+
+- Cleanup the build:
+cd ..
+rm -f build-aux/config.guess build-aux/config.sub build-aux/install-sh exec/config.guess exec/config.h.in exec/config.sub exec/install-sh lisp/loaddefs.el `find lisp -name '*.elc'`; git diff | patch -p1 -R
+
+- Select new version to test, and loop.
index 2cde7af14687c3acae48f70f4fa6520ff6c42fde..80fede9dd2cf02ed5d1382119e1be04261f4a22c 100644 (file)
@@ -62,7 +62,7 @@
 
 ;;; Code:
 \f
-(defconst po-mode-version-string "2.30" "\
+(defconst po-mode-version-string "2.31" "\
 Version number of this version of po-mode.el.")
 
 ;;; Emacs portability matters - part I.
@@ -1002,7 +1002,7 @@ all reachable through 'M-x customize', in group 'Emacs.Editing.I18n.Po'."
 
   (add-hook 'write-contents-functions 'po-replace-revision-date)
 
-  (run-hooks 'po-mode-hook)
+  (run-mode-hooks 'po-mode-hook)
   (message (_"You may type 'h' or '?' for a short PO mode reminder.")))
 
 (defvar po-subedit-mode-map