aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2022-05-01 19:11:21 +0200
committerUlrich Müller <ulm@gentoo.org>2022-05-01 19:11:21 +0200
commit197e833501a270c0f828eb097eacb14679ae1ba2 (patch)
tree852d12562e5f7c76a8d3874ba86d14b836b046bf
parentUpdate version to 1.4.20 (diff)
downloadeselect-197e833501a270c0f828eb097eacb14679ae1ba2.tar.gz
eselect-197e833501a270c0f828eb097eacb14679ae1ba2.tar.bz2
eselect-197e833501a270c0f828eb097eacb14679ae1ba2.zip
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@gentoo.org>
-rw-r--r--ChangeLog5
-rw-r--r--misc/eselect-mode.el9
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 <ulm@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 <ulm@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 <mkennedy@gentoo.org>
;; Diego Pettenò <flameeyes@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))