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