From: Bruno Haible Date: Thu, 9 Mar 2023 23:07:52 +0000 (+0100) Subject: po-mode: Fix incompatibility with the forthcoming Emacs 29. X-Git-Tag: v0.22~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f59e9441caa599a4e010f49e7a3480d765e6d315;p=thirdparty%2Fgettext.git 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. --- 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)