commit: 197e833501a270c0f828eb097eacb14679ae1ba2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org> AuthorDate: Sun May 1 17:11:21 2022 +0000 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org> CommitDate: Sun May 1 17:11:21 2022 +0000 URL: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=197e8335
Fix a byte-compile warning in eselect-mode * misc/eselect-mode.el (eselect-mode): For GNU Emacs, use write-contents-functions instead of obsolete write-contents-hooks. Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org> ChangeLog | 5 +++++ misc/eselect-mode.el | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8089935..83b0289 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2022-05-01 Ulrich Müller <u...@gentoo.org> + + * misc/eselect-mode.el (eselect-mode): For GNU Emacs, use + write-contents-functions instead of obsolete write-contents-hooks. + 2022-01-08 Ulrich Müller <u...@gentoo.org> * configure.ac: Update version to 1.4.20. diff --git a/misc/eselect-mode.el b/misc/eselect-mode.el index 667411b..50e88d6 100644 --- a/misc/eselect-mode.el +++ b/misc/eselect-mode.el @@ -1,6 +1,6 @@ ;;; eselect-mode.el --- edit eselect files -;; Copyright 2006-2020 Gentoo Authors +;; Copyright 2006-2022 Gentoo Authors ;; Author: Matthew Kennedy <mkenn...@gentoo.org> ;; Diego Pettenò <flamee...@gentoo.org> @@ -107,9 +107,10 @@ ;;;###autoload (define-derived-mode eselect-mode shell-script-mode "Eselect" "Major mode for .eselect files." - (if (featurep 'xemacs) - (make-local-hook 'write-contents-hooks)) - (add-hook 'write-contents-hooks 'eselect-mode-before-save t t) + (if (not (featurep 'xemacs)) + (add-hook 'write-contents-functions 'eselect-mode-before-save t t) + (make-local-hook 'write-contents-hooks) + (add-hook 'write-contents-hooks 'eselect-mode-before-save t t)) (sh-set-shell "bash") (setq tab-width 4) (setq indent-tabs-mode t))