*** empty log message ***
[gnus] / lisp / gnus-setup.el
1 ;;; gnus-setup.el --- Initialization & Setup for Gnus 5
2 ;; Copyright (C) 1995 Miranova Systems, Inc.
3
4 ;; Author: Steven L. Baur <steve@miranova.com>
5 ;; Keywords: news
6
7 ;; This file is not yet a part of GNU Emacs.
8
9 ;; GNU Emacs is free software; you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation; either version 2, or (at your option)
12 ;; any later version.
13
14 ;; GNU Emacs is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 ;; GNU General Public License for more details.
18
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with GNU Emacs; see the file COPYING.  If not, write to
21 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22
23 ;;; Commentary:
24 ;; My head is starting to spin with all the different mail/news packages.
25 ;; Stop The Madness!
26
27 ;; Given that Emacs Lisp byte codes may be diverging, it is probably best
28 ;; not to byte compile this, and just arrange to have the .el loaded out
29 ;; of .emacs.
30
31 ;;; Code:
32
33 (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
34
35 (defvar gnus-emacs-lisp-directory (if running-xemacs
36                                       "/usr/local/lib/xemacs/"
37                                     "/usr/local/share/emacs/")
38   "Directory where Emacs site lisp is located.")
39
40 (defvar gnus-gnus-lisp-directory (concat gnus-emacs-lisp-directory
41                                          "gnus-5.0.12/lisp/")
42   "Directory where Gnus Emacs lisp is found.")
43
44 (defvar gnus-sgnus-lisp-directory (concat gnus-emacs-lisp-directory
45                                           "sgnus/lisp/")
46   "Directory where September Gnus Emacs lisp is found.")
47
48 (defvar gnus-tm-lisp-directory (concat gnus-emacs-lisp-directory
49                                        "site-lisp/")
50   "Directory where TM Emacs lisp is found.")
51
52 (defvar gnus-mailcrypt-lisp-directory (concat gnus-emacs-lisp-directory
53                                               "site-lisp/mailcrypt-3.4/")
54   "Directory where Mailcrypt Emacs Lisp is found.")
55
56 (defvar gnus-bbdb-lisp-directory (concat gnus-emacs-lisp-directory
57                                          "site-lisp/bbdb-1.50/")
58   "Directory where Big Brother Database is found.")
59
60 (defvar gnus-use-tm t
61   "Set this if you want MIME support for Gnus")
62 (defvar gnus-use-mhe nil
63   "Set this if you want to use MH-E for mail reading")
64 (defvar gnus-use-rmail nil
65   "Set this if you want to use RMAIL for mail reading")
66 (defvar gnus-use-sendmail t
67   "Set this if you want to use SENDMAIL for mail reading")
68 (defvar gnus-use-vm nil
69   "Set this if you want to use the VM package for mail reading")
70 (defvar gnus-use-sc t
71   "Set this if you want to use Supercite")
72 (defvar gnus-use-mailcrypt t
73   "Set this if you want to use Mailcrypt for dealing with PGP messages")
74 (defvar gnus-use-bbdb nil
75   "Set this if you want to use the Big Brother DataBase")
76 (defvar gnus-use-september nil
77   "Set this if you are using the experimental September Gnus")
78
79 (let ((gnus-directory (if gnus-use-september
80                           gnus-sgnus-lisp-directory
81                         gnus-gnus-lisp-directory)))
82   (if (null (member gnus-directory load-path))
83       (setq load-path (cons gnus-directory load-path))))
84
85 ;;; Tools for MIME by
86 ;;; UMEDA Masanobu <umerin@mse.kyutech.ac.jp>
87 ;;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
88
89 (if gnus-use-tm
90     (progn
91       (if (null (member gnus-tm-lisp-directory load-path))
92           (setq load-path (cons gnus-tm-lisp-directory load-path)))
93        (load "mime-setup")))
94
95 ;;; Mailcrypt by
96 ;;; Jin Choi <jin@atype.com>
97 ;;; Patrick LoPresti <patl@lcs.mit.edu>
98
99 (if gnus-use-mailcrypt
100     (progn
101       (if (null (member gnus-mailcrypt-lisp-directory load-path))
102           (setq load-path (cons gnus-mailcrypt-lisp-directory load-path)))
103       (autoload 'mc-install-write-mode "mailcrypt" nil t)
104       (autoload 'mc-install-read-mode "mailcrypt" nil t)
105       (add-hook 'mail-mode-hook 'mc-install-write-mode)
106       (add-hook 'news-mode-hook 'mc-install-write-mode)
107       (add-hook 'news-reply-mode-hook 'mc-install-write-mode)
108       (add-hook 'gnus-summary-mode-hook 'mc-install-read-mode)
109       (if gnus-use-mhe
110           (progn
111             (add-hook 'mh-folder-mode-hook 'mc-install-read-mode)
112             (add-hook 'mh-letter-mode-hook 'mc-install-write-mode)))))
113
114 ;;; BBDB by
115 ;;; Jamie Zawinski <jwz@lucid.com>
116
117 (if gnus-use-bbdb
118     (progn
119       (if (null (member gnus-bbdb-lisp-directory load-path))
120           (setq load-path (cons gnus-bbdb-lisp-directory load-path)))
121       (autoload 'bbdb "bbdb-com"
122         "Insidious Big Brother Database" t)
123       (autoload 'bbdb-name "bbdb-com"
124         "Insidious Big Brother Database" t)
125       (autoload 'bbdb-company "bbdb-com"
126         "Insidious Big Brother Database" t)
127       (autoload 'bbdb-net "bbdb-com"
128         "Insidious Big Brother Database" t)
129       (autoload 'bbdb-notes "bbdb-com"
130         "Insidious Big Brother Database" t)
131
132       (if gnus-use-vm
133           (progn
134             (autoload 'bbdb-insinuate-vm "bbdb-vm"
135               "Hook BBDB into VM" t)))
136
137       (if gnus-use-rmail
138           (progn
139             (autoload 'bbdb-insinuate-rmail "bbdb-rmail"
140               "Hook BBDB into RMAIL" t)
141             (add-hook 'rmail-mode-hook 'bbdb-insinuate-rmail)))
142
143       (if gnus-use-mhe
144           (progn
145             (autoload 'bbdb-insinuate-mh "bbdb-mh"
146               "Hook BBDB into MH-E" t)
147             (add-hook 'mh-folder-mode-hook 'bbdb-insinuate-mh)))
148
149       (autoload 'bbdb-insinuate-gnus "bbdb-gnus"
150         "Hook BBDB into Gnus" t)
151       (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
152
153       (if gnus-use-sendmail
154           (progn
155             (autoload 'bbdb-insinuate-sendmail "bbdb"
156               "Insidious Big Brother Database" t)
157             (add-hook 'mail-setup-hook 'bbdb-insinuate-sendmail)))))
158
159 (if gnus-use-sc
160     (progn
161       (add-hook 'mail-citation-hook 'sc-cite-original)))
162 \f
163 ;;;### (autoloads (gnus-batch-score gnus-fetch-group gnus gnus-slave gnus-no-server gnus-update-format) "gnus" "lisp/gnus.el" (12473 2137))
164 ;;; Generated autoloads from lisp/gnus.el
165
166 (autoload 'gnus-update-format "gnus" "\
167 Update the format specification near point." t nil)
168
169 (autoload 'gnus-slave-no-server "gnus" "\
170 Read network news as a slave without connecting to local server." t nil)
171
172 (autoload 'gnus-no-server "gnus" "\
173 Read network news.
174 If ARG is a positive number, Gnus will use that as the
175 startup level.  If ARG is nil, Gnus will be started at level 2. 
176 If ARG is non-nil and not a positive number, Gnus will
177 prompt the user for the name of an NNTP server to use.
178 As opposed to `gnus', this command will not connect to the local server." t nil)
179
180 (autoload 'gnus-slave "gnus" "\
181 Read news as a slave." t nil)
182
183 (autoload 'gnus "gnus" "\
184 Read network news.
185 If ARG is non-nil and a positive number, Gnus will use that as the
186 startup level.  If ARG is non-nil and not a positive number, Gnus will
187 prompt the user for the name of an NNTP server to use." t nil)
188
189 (autoload 'gnus-fetch-group "gnus" "\
190 Start Gnus if necessary and enter GROUP.
191 Returns whether the fetching was successful or not." t nil)
192
193 (defalias 'gnus-batch-kill 'gnus-batch-score)
194
195 (autoload 'gnus-batch-score "gnus" "\
196 Run batched scoring.
197 Usage: emacs -batch -l gnus -f gnus-batch-score <newsgroups> ...
198 Newsgroups is a list of strings in Bnews format.  If you want to score
199 the comp hierarchy, you'd say \"comp.all\".  If you would not like to
200 score the alt hierarchy, you'd say \"!alt.all\"." t nil)
201
202 ;;;***
203
204 (provide 'gnus-setup)
205
206 (run-hooks 'gnus-setup-load-hook)
207
208 ;;; gnus-setup.el ends here