From 6b80a585c7f3600805c8cced58aa1f196e679c7c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 12 Mar 2018 11:25:40 -0700 Subject: [PATCH] Replace use of the obsolete write-contents-hooks * lisp/play/gametree.el (gametree-mode): Replace write-contents-hooks, obsolete since 22.1, with write-contents-functions. ; * lisp/files.el: Related comment. --- lisp/files.el | 1 + lisp/play/gametree.el | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index fbd3425cbb5..8ec2bde5880 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -521,6 +521,7 @@ updates before the buffer is saved, use `before-save-hook'.") (put 'local-write-file-hooks 'permanent-local t) (make-obsolete-variable 'local-write-file-hooks 'write-file-functions "22.1") +;; I found some files still using the obsolete form in 2018. (define-obsolete-variable-alias 'write-contents-hooks 'write-contents-functions "22.1") (defvar write-contents-functions nil diff --git a/lisp/play/gametree.el b/lisp/play/gametree.el index de8abd7abe4..5b05ae13e2f 100644 --- a/lisp/play/gametree.el +++ b/lisp/play/gametree.el @@ -586,8 +586,7 @@ shogi, etc.) players, it is a slightly modified version of Outline mode. \\{gametree-mode-map}" (auto-fill-mode 0) - (make-local-variable 'write-contents-hooks) - (add-hook 'write-contents-hooks 'gametree-save-and-hack-layout)) + (add-hook 'write-contents-functions 'gametree-save-and-hack-layout nil t)) ;;;; Goodies for mousing users (defun gametree-mouse-break-line-here (event) -- 2.39.2