aboutsummaryrefslogtreecommitdiff
path: root/misc
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 /misc
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>
Diffstat (limited to 'misc')
-rw-r--r--misc/eselect-mode.el9
1 files changed, 5 insertions, 4 deletions
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))