From f03010cac06f9a357464d18c7e93a4882d33f6fe Mon Sep 17 00:00:00 2001 From: czkmt Date: Mon, 6 Dec 1999 12:17:26 +0000 Subject: [PATCH] (gnus-offline-update-setting-file): Don't rely on `gnus-load-hook'. (gnus): New advice. Call `gnus-offline-setup' when everything is done. --- lisp/gnus-ofsetup.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/gnus-ofsetup.el b/lisp/gnus-ofsetup.el index e6d05a1..c31c565 100644 --- a/lisp/gnus-ofsetup.el +++ b/lisp/gnus-ofsetup.el @@ -45,6 +45,7 @@ "This variable decides which language will be used for display.")) (eval-when-compile + (require 'gnus) (require 'gnus-offline)) (defvar gnus-offline-setting-file @@ -160,8 +161,6 @@ "(add-hook" "'message-send-hook" "'gnus-offline-message-add-header)")) - (insert "(autoload 'gnus-offline-setup \"gnus-offline\")\n") - (insert "(add-hook 'gnus-load-hook 'gnus-offline-setup)\n") ;; Write stting about mail-source.el (insert "(setq gnus-offline-mail-source '" @@ -524,6 +523,7 @@ mail source specifier とか上記のようなキーワードについてもっとよく (gnus-ofsetup-prepare gnus-ofsetup-update-setting-file))) (load gnus-offline-setting-file)) + ;; Suppport for customizing gnus-ofsetup parameters. (defvar sendmail-to-spool-directory) @@ -721,4 +721,12 @@ mail source specifier とか上記のようなキーワードについてもっとよく (bury-buffer) (switch-to-buffer gnus-group-buffer)) + +;;; Code for making Gnus and Gnus Offline cooperate with each other. + +;; advice. +(defadvice gnus (around gnus-ofsetup-advice activate preactivate) + "Setup offline environment when Gnus is invoked." + (require 'gnus-offline) ad-do-it (gnus-offline-setup)) + ;; gnus-ofsetup.el Ends here. -- 1.7.10.4