]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
po-mode: Avoid a compiler warning in Emacs 28.
authorBruno Haible <bruno@clisp.org>
Sat, 27 Jul 2024 20:13:02 +0000 (22:13 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 27 Jul 2024 20:13:02 +0000 (22:13 +0200)
Reported by Vincent Lefèvre <vincent@vinc17.net> via Santiago Vila
at <https://lists.gnu.org/archive/html/bug-gettext/2024-06/msg00031.html>.

* gettext-tools/emacs/po-mode.el (po-mode-version-string): Bump version.
(po-mode): Use write-contents-functions instead of write-contents-hooks.

gettext-tools/emacs/po-mode.el

index 6416037c5ebb22630faffbb26bbd6e2ff76673d3..cad2bdac7226e52a2bec7f60931ef4ae5c554515 100644 (file)
@@ -1,6 +1,6 @@
 ;;; po-mode.el --- major mode for GNU gettext PO files
 
-;; Copyright (C) 1995-2002, 2005-2008, 2010, 2013-2017, 2019-2020, 2023 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2024 Free Software Foundation, Inc.
 
 ;; Authors: François Pinard <pinard@iro.umontreal.ca>
 ;;          Greg McGary <gkm@magilla.cichlid.com>
@@ -62,7 +62,7 @@
 
 ;;; Code:
 \f
-(defconst po-mode-version-string "2.29" "\
+(defconst po-mode-version-string "2.30" "\
 Version number of this version of po-mode.el.")
 
 ;;; Emacs portability matters - part I.
@@ -1000,7 +1000,7 @@ all reachable through 'M-x customize', in group 'Emacs.Editing.I18n.Po'."
   (set (make-local-variable 'po-string-end) nil)
   (set (make-local-variable 'po-marking-overlay) (po-create-overlay))
 
-  (add-hook 'write-contents-hooks 'po-replace-revision-date)
+  (add-hook 'write-contents-functions 'po-replace-revision-date)
 
   (run-hooks 'po-mode-hook)
   (message (_"You may type 'h' or '?' for a short PO mode reminder.")))