summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-03-10 00:07:52 +0100
committerBruno Haible <bruno@clisp.org>2023-03-10 00:13:03 +0100
commitf59e9441caa599a4e010f49e7a3480d765e6d315 (patch)
tree7924bcaddd585215d3d26c6df006558273aa0db8
parente62ed464dca2c06eec7945375372b7e4dfdeeb03 (diff)
downloadgettext-f59e9441caa599a4e010f49e7a3480d765e6d315.tar.gz
po-mode: Fix incompatibility with the forthcoming Emacs 29.
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.
-rw-r--r--NEWS3
-rw-r--r--gettext-tools/emacs/po-mode.el5
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 <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)