17493
|
1 ;;; gnus-setup.el --- Initialization & Setup for Gnus 5
|
|
2 ;; Copyright (C) 1995, 96 Free Software Foundation, Inc.
|
|
3
|
|
4 ;; Author: Steven L. Baur <steve@miranova.com>
|
|
5 ;; Keywords: news
|
|
6
|
|
7 ;; This file is 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 (require 'cl)
|
|
35
|
|
36 (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
|
|
37
|
|
38 (defvar gnus-use-installed-gnus t
|
|
39 "*If non-nil Use installed version of Gnus.")
|
|
40
|
|
41 (defvar gnus-use-installed-tm running-xemacs
|
|
42 "*If non-nil use installed version of tm.")
|
|
43
|
|
44 (defvar gnus-use-installed-mailcrypt running-xemacs
|
|
45 "*If non-nil use installed version of mailcrypt.")
|
|
46
|
|
47 (defvar gnus-emacs-lisp-directory (if running-xemacs
|
|
48 "/usr/local/lib/xemacs/"
|
|
49 "/usr/local/share/emacs/")
|
|
50 "Directory where Emacs site lisp is located.")
|
|
51
|
|
52 (defvar gnus-gnus-lisp-directory (concat gnus-emacs-lisp-directory
|
|
53 "gnus-5.0.15/lisp/")
|
|
54 "Directory where Gnus Emacs lisp is found.")
|
|
55
|
|
56 (defvar gnus-tm-lisp-directory (concat gnus-emacs-lisp-directory
|
|
57 "site-lisp/")
|
|
58 "Directory where TM Emacs lisp is found.")
|
|
59
|
|
60 (defvar gnus-mailcrypt-lisp-directory (concat gnus-emacs-lisp-directory
|
|
61 "site-lisp/mailcrypt-3.4/")
|
|
62 "Directory where Mailcrypt Emacs Lisp is found.")
|
|
63
|
|
64 (defvar gnus-bbdb-lisp-directory (concat gnus-emacs-lisp-directory
|
|
65 "site-lisp/bbdb-1.51/")
|
|
66 "Directory where Big Brother Database is found.")
|
|
67
|
|
68 (defvar gnus-use-tm running-xemacs
|
|
69 "Set this if you want MIME support for Gnus")
|
|
70 (defvar gnus-use-mhe nil
|
|
71 "Set this if you want to use MH-E for mail reading")
|
|
72 (defvar gnus-use-rmail nil
|
|
73 "Set this if you want to use RMAIL for mail reading")
|
|
74 (defvar gnus-use-sendmail t
|
|
75 "Set this if you want to use SENDMAIL for mail reading")
|
|
76 (defvar gnus-use-vm nil
|
|
77 "Set this if you want to use the VM package for mail reading")
|
|
78 (defvar gnus-use-sc nil
|
|
79 "Set this if you want to use Supercite")
|
|
80 (defvar gnus-use-mailcrypt t
|
|
81 "Set this if you want to use Mailcrypt for dealing with PGP messages")
|
|
82 (defvar gnus-use-bbdb nil
|
|
83 "Set this if you want to use the Big Brother DataBase")
|
|
84
|
|
85 (when (and (not gnus-use-installed-gnus)
|
|
86 (null (member gnus-gnus-lisp-directory load-path)))
|
|
87 (push gnus-gnus-lisp-directory load-path))
|
|
88
|
|
89 ;;; We can't do this until we know where Gnus is.
|
|
90 (require 'message)
|
|
91
|
|
92 ;;; Tools for MIME by
|
|
93 ;;; UMEDA Masanobu <umerin@mse.kyutech.ac.jp>
|
|
94 ;;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
|
|
95
|
|
96 (when gnus-use-tm
|
|
97 (when (and (not gnus-use-installed-tm)
|
|
98 (null (member gnus-tm-lisp-directory load-path)))
|
|
99 (setq load-path (cons gnus-tm-lisp-directory load-path)))
|
|
100 ;; tm may or may not be dumped with XEmacs. In Sunpro it is, otherwise
|
|
101 ;; it isn't.
|
|
102 (unless (featurep 'mime-setup)
|
|
103 (load "mime-setup")))
|
|
104
|
|
105 ;;; Mailcrypt by
|
|
106 ;;; Jin Choi <jin@atype.com>
|
|
107 ;;; Patrick LoPresti <patl@lcs.mit.edu>
|
|
108
|
|
109 (when gnus-use-mailcrypt
|
|
110 (when (and (not gnus-use-installed-mailcrypt)
|
|
111 (null (member gnus-mailcrypt-lisp-directory load-path)))
|
|
112 (setq load-path (cons gnus-mailcrypt-lisp-directory load-path)))
|
|
113 (autoload 'mc-install-write-mode "mailcrypt" nil t)
|
|
114 (autoload 'mc-install-read-mode "mailcrypt" nil t)
|
|
115 (add-hook 'message-mode-hook 'mc-install-write-mode)
|
|
116 (add-hook 'gnus-summary-mode-hook 'mc-install-read-mode)
|
|
117 (when gnus-use-mhe
|
|
118 (add-hook 'mh-folder-mode-hook 'mc-install-read-mode)
|
|
119 (add-hook 'mh-letter-mode-hook 'mc-install-write-mode)))
|
|
120
|
|
121 ;;; BBDB by
|
|
122 ;;; Jamie Zawinski <jwz@lucid.com>
|
|
123
|
|
124 (when gnus-use-bbdb
|
|
125 ;; bbdb will never be installed with emacs.
|
|
126 (when (null (member gnus-bbdb-lisp-directory load-path))
|
|
127 (setq load-path (cons gnus-bbdb-lisp-directory load-path)))
|
|
128 (autoload 'bbdb "bbdb-com"
|
|
129 "Insidious Big Brother Database" t)
|
|
130 (autoload 'bbdb-name "bbdb-com"
|
|
131 "Insidious Big Brother Database" t)
|
|
132 (autoload 'bbdb-company "bbdb-com"
|
|
133 "Insidious Big Brother Database" t)
|
|
134 (autoload 'bbdb-net "bbdb-com"
|
|
135 "Insidious Big Brother Database" t)
|
|
136 (autoload 'bbdb-notes "bbdb-com"
|
|
137 "Insidious Big Brother Database" t)
|
|
138
|
|
139 (when gnus-use-vm
|
|
140 (autoload 'bbdb-insinuate-vm "bbdb-vm"
|
|
141 "Hook BBDB into VM" t))
|
|
142
|
|
143 (when gnus-use-rmail
|
|
144 (autoload 'bbdb-insinuate-rmail "bbdb-rmail"
|
|
145 "Hook BBDB into RMAIL" t)
|
|
146 (add-hook 'rmail-mode-hook 'bbdb-insinuate-rmail))
|
|
147
|
|
148 (when gnus-use-mhe
|
|
149 (autoload 'bbdb-insinuate-mh "bbdb-mh"
|
|
150 "Hook BBDB into MH-E" t)
|
|
151 (add-hook 'mh-folder-mode-hook 'bbdb-insinuate-mh))
|
|
152
|
|
153 (autoload 'bbdb-insinuate-gnus "bbdb-gnus"
|
|
154 "Hook BBDB into Gnus" t)
|
|
155 (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus)
|
|
156
|
|
157 (when gnus-use-sendmail
|
|
158 (autoload 'bbdb-insinuate-sendmail "bbdb"
|
|
159 "Insidious Big Brother Database" t)
|
|
160 (add-hook 'mail-setup-hook 'bbdb-insinuate-sendmail)
|
|
161 (add-hook 'message-setup-hook 'bbdb-insinuate-sendmail)))
|
|
162
|
|
163 (when gnus-use-sc
|
|
164 (add-hook 'mail-citation-hook 'sc-cite-original)
|
|
165 (setq message-cite-function 'sc-cite-original)
|
|
166 (autoload 'sc-cite-original "supercite"))
|
|
167
|
|
168 ;;;### (autoloads (gnus gnus-slave gnus-no-server) "gnus" "lisp/gnus.el" (12473 2137))
|
|
169 ;;; Generated autoloads from lisp/gnus.el
|
|
170
|
|
171 ;; Don't redo this if autoloads already exist
|
|
172 (unless (fboundp 'gnus)
|
|
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 ;;;***
|
|
194
|
|
195 ;;; These have moved out of gnus.el into other files.
|
|
196 ;;; FIX FIX FIX: should other things be in gnus-setup? or these not in it?
|
|
197 (autoload 'gnus-update-format "gnus-spec" "\
|
|
198 Update the format specification near point." t nil)
|
|
199
|
|
200 (autoload 'gnus-fetch-group "gnus-group" "\
|
|
201 Start Gnus if necessary and enter GROUP.
|
|
202 Returns whether the fetching was successful or not." t nil)
|
|
203
|
|
204 (defalias 'gnus-batch-kill 'gnus-batch-score)
|
|
205
|
|
206 (autoload 'gnus-batch-score "gnus-kill" "\
|
|
207 Run batched scoring.
|
|
208 Usage: emacs -batch -l gnus -f gnus-batch-score <newsgroups> ...
|
|
209 Newsgroups is a list of strings in Bnews format. If you want to score
|
|
210 the comp hierarchy, you'd say \"comp.all\". If you would not like to
|
|
211 score the alt hierarchy, you'd say \"!alt.all\"." t nil))
|
|
212
|
|
213 (provide 'gnus-setup)
|
|
214
|
|
215 (run-hooks 'gnus-setup-load-hook)
|
|
216
|
|
217 ;;; gnus-setup.el ends here
|