]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/nndraft.el
Allow reading Gnus reports from an offline cache
[gnu-emacs] / lisp / gnus / nndraft.el
index 764314de0af201d3ecb57f19b90521646469edfb..f10b6fa3df8d4e0b4f5086c7920dc03b8608f2cd 100644 (file)
@@ -1,6 +1,6 @@
 ;;; nndraft.el --- draft article access for Gnus
 
-;; Copyright (C) 1995-2014 Free Software Foundation, Inc.
+;; Copyright (C) 1995-2016 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -203,12 +203,7 @@ are generated if and only if they are also in `message-draft-headers'.")
     (setq buffer-file-name (expand-file-name file)
          buffer-auto-save-file-name (make-auto-save-file-name))
     (clear-visited-file-modtime)
-    (let ((hook (if (boundp 'write-contents-functions)
-                   'write-contents-functions
-                 'write-contents-hooks)))
-      (gnus-make-local-hook hook)
-      (add-hook hook 'nndraft-generate-headers nil t))
-    (gnus-make-local-hook 'after-save-hook)
+    (add-hook 'write-contents-functions 'nndraft-generate-headers nil t)
     (add-hook 'after-save-hook 'nndraft-update-unread-articles nil t)
     (message-add-action '(nndraft-update-unread-articles)
                        'exit 'postpone 'kill)