]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
po-mode: Fix incompatibility with the forthcoming Emacs 29.
authorBruno Haible <bruno@clisp.org>
Thu, 9 Mar 2023 23:07:52 +0000 (00:07 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 9 Mar 2023 23:13:03 +0000 (00:13 +0100)
Patch by Takesi Ayanokoji <ayanokoji.takesi@gmail.com>.

* 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
gettext-tools/emacs/po-mode.el

diff --git a/NEWS b/NEWS
index 01fc5498d4eb368568110dbd489f900ead553eb6..1456de2e1d5a63873f1bd752a9aed631d9c04720 100644 (file)
--- 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:
index e04428772c1c487773282d68115672dd1e823fa5..fedc70fd3999c77a9dbfbb4a7975b6697c0dd635 100644 (file)
@@ -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 <pinard@iro.umontreal.ca>
 ;;          Greg McGary <gkm@magilla.cichlid.com>
@@ -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)