From f59e9441caa599a4e010f49e7a3480d765e6d315 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 10 Mar 2023 00:07:52 +0100 Subject: [PATCH] po-mode: Fix incompatibility with the forthcoming Emacs 29. Patch by Takesi Ayanokoji . * gettext-tools/emacs/po-mode.el (po-font-lock-keywords): Use font-lock-constant-face, introduced in Emacs 20.3, instead of the long-deprecated font-lock-reference-face. * NEWS: Mention it. --- NEWS | 3 +++ gettext-tools/emacs/po-mode.el | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 01fc5498d..1456de2e1 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,9 @@ Version 0.21.2 - February 2023 * xgettext: The xgettext option '--sorted-output' is now deprecated. +* Emacs PO mode: + Fix an incompatibility with Emacs version 29 or newer. + Version 0.21.1 - October 2022 * Runtime behaviour: diff --git a/gettext-tools/emacs/po-mode.el b/gettext-tools/emacs/po-mode.el index e04428772..fedc70fd3 100644 --- a/gettext-tools/emacs/po-mode.el +++ b/gettext-tools/emacs/po-mode.el @@ -1,7 +1,6 @@ ;;; po-mode.el --- major mode for GNU gettext PO files -;; Copyright (C) 1995-2002, 2005-2008, 2010, 2013-2017, 2019-2020 Free Software -;; Foundation, Inc. +;; Copyright (C) 1995-2002, 2005-2008, 2010, 2013-2017, 2019-2020, 2023 Free Software Foundation, Inc. ;; Authors: François Pinard ;; Greg McGary @@ -909,7 +908,7 @@ M-S Ignore path M-A Ignore PO file *M-L Ignore lexicon (defconst po-font-lock-keywords '( ("^# .*\\|^#[:,]?" . font-lock-comment-face) - ("^#:\\(.*\\)" 1 font-lock-reference-face) + ("^#:\\(.*\\)" 1 font-lock-constant-face) ("^#,\\(.*\\)" 1 font-lock-function-name-face) ("^\\(\\(msg\\(ctxt\\|id\\(_plural\\)?\\|str\\(\\[[0-9]\\]\\)?\\)\\) \\)?\"\\|\"$" . font-lock-keyword-face) -- 2.47.3