From e679e0abcf2a1c5c8c95974a9f759edac9c934b4 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 27 Oct 2020 00:49:28 +0100 Subject: [PATCH] Don't use obsolete variable write-contents-hooks * lisp/mh-e/mh-show.el (mh-display-msg): * lisp/textmodes/rst.el: Don't use obsolete variable write-contents-hooks. Problem reported by Stefan Monnier . --- lisp/mh-e/mh-show.el | 2 +- lisp/textmodes/rst.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el index 04551acd143..7536f949e76 100644 --- a/lisp/mh-e/mh-show.el +++ b/lisp/mh-e/mh-show.el @@ -219,7 +219,7 @@ Sets the current buffer to the show buffer." (erase-buffer) ;; Changing contents, so this hook needs to be reinitialized. ;; pgp.el uses this. - (kill-local-variable 'write-contents-hooks) + (kill-local-variable 'write-contents-functions) (font-lock-mode -1) (mh-show-mode) (if formfile diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index f2fcd62c871..adda28cb81b 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -2862,7 +2862,7 @@ file-write hook to always make it up-to-date automatically." ;; FIXME: Updating the toc on saving would be nice. However, this doesn't work ;; correctly: ;; -;; (add-hook 'write-contents-hooks 'rst-toc-update-fun) +;; (add-hook 'write-contents-functions 'rst-toc-update-fun) ;; (defun rst-toc-update-fun () ;; ;; Disable undo for the write file hook. ;; (let ((buffer-undo-list t)) (rst-toc-update) )) -- 2.39.5