]> git.eshelyaron.com Git - emacs.git/commitdiff
Replace use of the obsolete write-contents-hooks
authorGlenn Morris <rgm@gnu.org>
Mon, 12 Mar 2018 18:25:40 +0000 (11:25 -0700)
committerAndrew G Cohen <cohen@andy.bu.edu>
Tue, 11 Dec 2018 06:15:04 +0000 (14:15 +0800)
* 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
lisp/play/gametree.el

index fbd3425cbb54bd837cd8a88e366f3560ff945373..8ec2bde5880516f8c09209c67704bb8763d03b1a 100644 (file)
@@ -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
index de8abd7abe4d4a43b18572a93ee854eb2a8eba04..5b05ae13e2f0ee9dbec677cd1ab89972f8403d03 100644 (file)
@@ -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)