From: czkmt Date: Mon, 6 Dec 1999 12:17:26 +0000 (+0000) Subject: (gnus-offline-update-setting-file): Don't rely on `gnus-load-hook'. X-Git-Tag: t-gnus-6_14_0-03~4 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f03010cac06f9a357464d18c7e93a4882d33f6fe;p=elisp%2Fgnus.git- (gnus-offline-update-setting-file): Don't rely on `gnus-load-hook'. (gnus): New advice. Call `gnus-offline-setup' when everything is done. --- 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.