From e68b3eaaa7abcfdd693a94810f2b9cb0345b700d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 2 Oct 2025 22:50:11 +0200 Subject: [PATCH] Restore syntax highlighting in Emacs 30 or newer. Reported by Sab Pyrope in and by Julien Palard in . It's a regression in Emacs 30, in commit 17e26cf57e18c5df2172a7049591d89fc53b3fb6 . * 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 | 5 +++++ gettext-tools/emacs/po-mode.el | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index a5cc8a63e..747e6b4fd 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +Version 0.23.3 + +* Emacs PO mode: + Restore syntax highlighting in Emacs version 30 or newer. + Version 0.23.2 - July 2025 * Bug fixes: diff --git a/gettext-tools/emacs/po-mode.el b/gettext-tools/emacs/po-mode.el index cad2bdac7..91da8d283 100644 --- a/gettext-tools/emacs/po-mode.el +++ b/gettext-tools/emacs/po-mode.el @@ -1,6 +1,6 @@ ;;; po-mode.el --- major mode for GNU gettext PO files -;; Copyright (C) 1995-2024 Free Software Foundation, Inc. +;; Copyright (C) 1995-2025 Free Software Foundation, Inc. ;; Authors: François Pinard ;; Greg McGary @@ -62,7 +62,7 @@ ;;; Code: -(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