From: Glenn Morris Date: Mon, 12 Mar 2018 18:25:40 +0000 (-0700) Subject: Replace use of the obsolete write-contents-hooks X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fd1f96f9bbac434eb206c646218ff08bbff6c59a;p=emacs.git 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. --- 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)