Mercurial > hg > xemacs-beta
comparison lisp/gnus/gnus-setup.el @ 12:bcdc7deadc19 r19-15b7
Import from CVS: tag r19-15b7
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:48:16 +0200 |
parents | 376386a54a3c |
children | 0293115a14e9 |
comparison
equal
deleted
inserted
replaced
11:91ffe8bd52e4 | 12:bcdc7deadc19 |
---|---|
1 ;;; gnus-setup.el --- Initialization & Setup for Gnus 5 | 1 ;;; gnus-setup.el --- Initialization & Setup for Gnus 5 |
2 ;; Copyright (C) 1995, 96 Free Software Foundation, Inc. | 2 ;; Copyright (C) 1995, 96, 97 Free Software Foundation, Inc. |
3 | 3 |
4 ;; Author: Steven L. Baur <steve@miranova.com> | 4 ;; Author: Steven L. Baur <steve@altair.xemacs.org> |
5 ;; Keywords: news | 5 ;; Keywords: news |
6 | 6 |
7 ;; This file is part of GNU Emacs. | 7 ;; This file is part of GNU Emacs. |
8 | 8 |
9 ;; GNU Emacs is free software; you can redistribute it and/or modify | 9 ;; GNU Emacs is free software; you can redistribute it and/or modify |
27 | 27 |
28 ;; Given that Emacs Lisp byte codes may be diverging, it is probably best | 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 | 29 ;; not to byte compile this, and just arrange to have the .el loaded out |
30 ;; of .emacs. | 30 ;; of .emacs. |
31 | 31 |
32 ;; Dec-28 1996: Updated for better handling of preinstalled Gnus | |
33 | |
32 ;;; Code: | 34 ;;; Code: |
33 | 35 |
36 (eval-when-compile | |
37 (require 'cl)) | |
38 | |
34 (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) | 39 (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) |
40 | |
41 (defvar gnus-use-installed-gnus t | |
42 "*If non-nil Use installed version of Gnus.") | |
43 | |
44 (defvar gnus-use-installed-tm running-xemacs | |
45 "*If non-nil use installed version of tm.") | |
46 | |
47 (defvar gnus-use-installed-mailcrypt running-xemacs | |
48 "*If non-nil use installed version of mailcrypt.") | |
35 | 49 |
36 (defvar gnus-emacs-lisp-directory (if running-xemacs | 50 (defvar gnus-emacs-lisp-directory (if running-xemacs |
37 "/usr/local/lib/xemacs/" | 51 "/usr/local/lib/xemacs/" |
38 "/usr/local/share/emacs/") | 52 "/usr/local/share/emacs/") |
39 "Directory where Emacs site lisp is located.") | 53 "Directory where Emacs site lisp is located.") |
40 | 54 |
41 (defvar gnus-gnus-lisp-directory (concat gnus-emacs-lisp-directory | 55 (defvar gnus-gnus-lisp-directory (concat gnus-emacs-lisp-directory |
42 "gnus-5.0.15/lisp/") | 56 "gnus-5.0.15/lisp/") |
43 "Directory where Gnus Emacs lisp is found.") | 57 "Directory where Gnus Emacs lisp is found.") |
44 | 58 |
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 | 59 (defvar gnus-tm-lisp-directory (concat gnus-emacs-lisp-directory |
50 "site-lisp/") | 60 "site-lisp/") |
51 "Directory where TM Emacs lisp is found.") | 61 "Directory where TM Emacs lisp is found.") |
52 | 62 |
53 (defvar gnus-mailcrypt-lisp-directory (concat gnus-emacs-lisp-directory | 63 (defvar gnus-mailcrypt-lisp-directory (concat gnus-emacs-lisp-directory |
54 "site-lisp/mailcrypt-3.4/") | 64 "site-lisp/mailcrypt-3.4/") |
55 "Directory where Mailcrypt Emacs Lisp is found.") | 65 "Directory where Mailcrypt Emacs Lisp is found.") |
56 | 66 |
57 (defvar gnus-bbdb-lisp-directory (concat gnus-emacs-lisp-directory | 67 (defvar gnus-bbdb-lisp-directory (concat gnus-emacs-lisp-directory |
58 "site-lisp/bbdb-1.50/") | 68 "site-lisp/bbdb-1.51/") |
59 "Directory where Big Brother Database is found.") | 69 "Directory where Big Brother Database is found.") |
60 | 70 |
61 (defvar gnus-use-tm t | 71 (defvar gnus-use-tm running-xemacs |
62 "Set this if you want MIME support for Gnus") | 72 "Set this if you want MIME support for Gnus") |
63 (defvar gnus-use-mhe nil | 73 (defvar gnus-use-mhe nil |
64 "Set this if you want to use MH-E for mail reading") | 74 "Set this if you want to use MH-E for mail reading") |
65 (defvar gnus-use-rmail nil | 75 (defvar gnus-use-rmail nil |
66 "Set this if you want to use RMAIL for mail reading") | 76 "Set this if you want to use RMAIL for mail reading") |
75 (defvar gnus-use-bbdb nil | 85 (defvar gnus-use-bbdb nil |
76 "Set this if you want to use the Big Brother DataBase") | 86 "Set this if you want to use the Big Brother DataBase") |
77 (defvar gnus-use-september nil | 87 (defvar gnus-use-september nil |
78 "Set this if you are using the experimental September Gnus") | 88 "Set this if you are using the experimental September Gnus") |
79 | 89 |
80 (let ((gnus-directory (if gnus-use-september | 90 (when (and (not gnus-use-installed-gnus) |
81 gnus-sgnus-lisp-directory | 91 (null (member gnus-gnus-lisp-directory load-path))) |
82 gnus-gnus-lisp-directory))) | 92 (setq load-path (cons gnus-gnus-lisp-directory load-path))) |
83 (if (null (member gnus-directory load-path)) | 93 |
84 (setq load-path (cons gnus-directory load-path)))) | 94 (require 'message) |
85 | 95 |
86 ;;; Tools for MIME by | 96 ;;; Tools for MIME by |
87 ;;; UMEDA Masanobu <umerin@mse.kyutech.ac.jp> | 97 ;;; UMEDA Masanobu <umerin@mse.kyutech.ac.jp> |
88 ;;; MORIOKA Tomohiko <morioka@jaist.ac.jp> | 98 ;;; MORIOKA Tomohiko <morioka@jaist.ac.jp> |
89 | 99 |
90 (if gnus-use-tm | 100 (when gnus-use-tm |
91 (progn | 101 (when (and (not gnus-use-installed-tm) |
92 (if (null (member gnus-tm-lisp-directory load-path)) | 102 (null (member gnus-tm-lisp-directory load-path))) |
93 (setq load-path (cons gnus-tm-lisp-directory load-path))) | 103 (setq load-path (cons gnus-tm-lisp-directory load-path))) |
94 (load "mime-setup"))) | 104 ;; tm may or may not be dumped with XEmacs. In Sunpro it is, otherwise |
105 ;; it isn't. | |
106 (unless (featurep 'mime-setup) | |
107 (load "mime-setup"))) | |
95 | 108 |
96 ;;; Mailcrypt by | 109 ;;; Mailcrypt by |
97 ;;; Jin Choi <jin@atype.com> | 110 ;;; Jin Choi <jin@atype.com> |
98 ;;; Patrick LoPresti <patl@lcs.mit.edu> | 111 ;;; Patrick LoPresti <patl@lcs.mit.edu> |
99 | 112 |
100 (if gnus-use-mailcrypt | 113 (when gnus-use-mailcrypt |
101 (progn | 114 (when (and (not gnus-use-installed-mailcrypt) |
102 (if (null (member gnus-mailcrypt-lisp-directory load-path)) | 115 (null (member gnus-mailcrypt-lisp-directory load-path))) |
103 (setq load-path (cons gnus-mailcrypt-lisp-directory load-path))) | 116 (setq load-path (cons gnus-mailcrypt-lisp-directory load-path))) |
104 (autoload 'mc-install-write-mode "mailcrypt" nil t) | 117 (autoload 'mc-install-write-mode "mailcrypt" nil t) |
105 (autoload 'mc-install-read-mode "mailcrypt" nil t) | 118 (autoload 'mc-install-read-mode "mailcrypt" nil t) |
106 (add-hook 'message-mode-hook 'mc-install-write-mode) | 119 (add-hook 'message-mode-hook 'mc-install-write-mode) |
107 (add-hook 'gnus-summary-mode-hook 'mc-install-read-mode) | 120 (add-hook 'gnus-summary-mode-hook 'mc-install-read-mode) |
108 (if gnus-use-mhe | 121 (when gnus-use-mhe |
109 (progn | 122 (add-hook 'mh-folder-mode-hook 'mc-install-read-mode) |
110 (add-hook 'mh-folder-mode-hook 'mc-install-read-mode) | 123 (add-hook 'mh-letter-mode-hook 'mc-install-write-mode))) |
111 (add-hook 'mh-letter-mode-hook 'mc-install-write-mode))))) | |
112 | 124 |
113 ;;; BBDB by | 125 ;;; BBDB by |
114 ;;; Jamie Zawinski <jwz@lucid.com> | 126 ;;; Jamie Zawinski <jwz@netscape.com> |
115 | 127 |
116 (if gnus-use-bbdb | 128 (when gnus-use-bbdb |
117 (progn | 129 ;; bbdb will never be installed with emacs. |
118 (if (null (member gnus-bbdb-lisp-directory load-path)) | 130 (when (null (member gnus-bbdb-lisp-directory load-path)) |
119 (setq load-path (cons gnus-bbdb-lisp-directory load-path))) | 131 (setq load-path (cons gnus-bbdb-lisp-directory load-path))) |
120 (autoload 'bbdb "bbdb-com" | 132 (autoload 'bbdb "bbdb-com" |
121 "Insidious Big Brother Database" t) | 133 "Insidious Big Brother Database" t) |
122 (autoload 'bbdb-name "bbdb-com" | 134 (autoload 'bbdb-name "bbdb-com" |
123 "Insidious Big Brother Database" t) | 135 "Insidious Big Brother Database" t) |
124 (autoload 'bbdb-company "bbdb-com" | 136 (autoload 'bbdb-company "bbdb-com" |
125 "Insidious Big Brother Database" t) | 137 "Insidious Big Brother Database" t) |
126 (autoload 'bbdb-net "bbdb-com" | 138 (autoload 'bbdb-net "bbdb-com" |
127 "Insidious Big Brother Database" t) | 139 "Insidious Big Brother Database" t) |
128 (autoload 'bbdb-notes "bbdb-com" | 140 (autoload 'bbdb-notes "bbdb-com" |
129 "Insidious Big Brother Database" t) | 141 "Insidious Big Brother Database" t) |
130 | 142 |
131 (if gnus-use-vm | 143 (when gnus-use-vm |
132 (progn | 144 (autoload 'bbdb-insinuate-vm "bbdb-vm" |
133 (autoload 'bbdb-insinuate-vm "bbdb-vm" | 145 "Hook BBDB into VM" t)) |
134 "Hook BBDB into VM" t))) | 146 |
135 | 147 (when gnus-use-rmail |
136 (if gnus-use-rmail | 148 (autoload 'bbdb-insinuate-rmail "bbdb-rmail" |
137 (progn | 149 "Hook BBDB into RMAIL" t) |
138 (autoload 'bbdb-insinuate-rmail "bbdb-rmail" | 150 (add-hook 'rmail-mode-hook 'bbdb-insinuate-rmail)) |
139 "Hook BBDB into RMAIL" t) | 151 |
140 (add-hook 'rmail-mode-hook 'bbdb-insinuate-rmail))) | 152 (when gnus-use-mhe |
141 | 153 (autoload 'bbdb-insinuate-mh "bbdb-mh" |
142 (if gnus-use-mhe | 154 "Hook BBDB into MH-E" t) |
143 (progn | 155 (add-hook 'mh-folder-mode-hook 'bbdb-insinuate-mh)) |
144 (autoload 'bbdb-insinuate-mh "bbdb-mh" | 156 |
145 "Hook BBDB into MH-E" t) | 157 (autoload 'bbdb-insinuate-gnus "bbdb-gnus" |
146 (add-hook 'mh-folder-mode-hook 'bbdb-insinuate-mh))) | 158 "Hook BBDB into Gnus" t) |
147 | 159 (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus) |
148 (autoload 'bbdb-insinuate-gnus "bbdb-gnus" | 160 |
149 "Hook BBDB into Gnus" t) | 161 (when gnus-use-sendmail |
150 (add-hook 'gnus-startup-hook 'bbdb-insinuate-gnus) | 162 (autoload 'bbdb-insinuate-sendmail "bbdb" |
151 | 163 "Insidious Big Brother Database" t) |
152 (if gnus-use-sendmail | 164 (add-hook 'mail-setup-hook 'bbdb-insinuate-sendmail) |
153 (progn | 165 (add-hook 'message-setup-hook 'bbdb-insinuate-sendmail))) |
154 (autoload 'bbdb-insinuate-sendmail "bbdb" | 166 |
155 "Insidious Big Brother Database" t) | 167 (when gnus-use-sc |
156 (add-hook 'mail-setup-hook 'bbdb-insinuate-sendmail) | 168 (add-hook 'mail-citation-hook 'sc-cite-original) |
157 (add-hook 'message-setup-hook 'bbdb-insinuate-sendmail))))) | 169 (setq message-cite-function 'sc-cite-original) |
158 | 170 (autoload 'sc-cite-original "supercite")) |
159 (if gnus-use-sc | |
160 (progn | |
161 (add-hook 'mail-citation-hook 'sc-cite-original) | |
162 (setq message-cite-function 'sc-cite-original) | |
163 (autoload 'sc-cite-original "supercite"))) | |
164 | 171 |
165 ;;;### (autoloads (gnus-batch-score gnus-fetch-group gnus gnus-slave gnus-no-server gnus-update-format) "gnus" "lisp/gnus.el" (12473 2137)) | 172 ;;;### (autoloads (gnus-batch-score gnus-fetch-group gnus gnus-slave gnus-no-server gnus-update-format) "gnus" "lisp/gnus.el" (12473 2137)) |
166 ;;; Generated autoloads from lisp/gnus.el | 173 ;;; Generated autoloads from lisp/gnus.el |
167 | 174 |
168 (autoload 'gnus-update-format "gnus" "\ | 175 ;; Don't redo this if autoloads already exist |
176 (unless (fboundp 'gnus) | |
177 (autoload 'gnus-update-format "gnus" "\ | |
169 Update the format specification near point." t nil) | 178 Update the format specification near point." t nil) |
170 | 179 |
171 (autoload 'gnus-slave-no-server "gnus" "\ | 180 (autoload 'gnus-slave-no-server "gnus" "\ |
172 Read network news as a slave without connecting to local server." t nil) | 181 Read network news as a slave without connecting to local server." t nil) |
173 | 182 |
174 (autoload 'gnus-no-server "gnus" "\ | 183 (autoload 'gnus-no-server "gnus" "\ |
175 Read network news. | 184 Read network news. |
176 If ARG is a positive number, Gnus will use that as the | 185 If ARG is a positive number, Gnus will use that as the |
177 startup level. If ARG is nil, Gnus will be started at level 2. | 186 startup level. If ARG is nil, Gnus will be started at level 2. |
178 If ARG is non-nil and not a positive number, Gnus will | 187 If ARG is non-nil and not a positive number, Gnus will |
179 prompt the user for the name of an NNTP server to use. | 188 prompt the user for the name of an NNTP server to use. |
180 As opposed to `gnus', this command will not connect to the local server." t nil) | 189 As opposed to `gnus', this command will not connect to the local server." |
181 | 190 t nil) |
182 (autoload 'gnus-slave "gnus" "\ | 191 |
192 (autoload 'gnus-slave "gnus" "\ | |
183 Read news as a slave." t nil) | 193 Read news as a slave." t nil) |
184 | 194 |
185 (autoload 'gnus "gnus" "\ | 195 (autoload 'gnus "gnus" "\ |
186 Read network news. | 196 Read network news. |
187 If ARG is non-nil and a positive number, Gnus will use that as the | 197 If ARG is non-nil and a positive number, Gnus will use that as the |
188 startup level. If ARG is non-nil and not a positive number, Gnus will | 198 startup level. If ARG is non-nil and not a positive number, Gnus will |
189 prompt the user for the name of an NNTP server to use." t nil) | 199 prompt the user for the name of an NNTP server to use." t nil) |
190 | 200 |
191 (autoload 'gnus-fetch-group "gnus" "\ | 201 (autoload 'gnus-fetch-group "gnus" "\ |
192 Start Gnus if necessary and enter GROUP. | 202 Start Gnus if necessary and enter GROUP. |
193 Returns whether the fetching was successful or not." t nil) | 203 Returns whether the fetching was successful or not." t nil) |
194 | 204 |
195 (defalias 'gnus-batch-kill 'gnus-batch-score) | 205 (defalias 'gnus-batch-kill 'gnus-batch-score) |
196 | 206 |
197 (autoload 'gnus-batch-score "gnus" "\ | 207 (autoload 'gnus-batch-score "gnus" "\ |
198 Run batched scoring. | 208 Run batched scoring. |
199 Usage: emacs -batch -l gnus -f gnus-batch-score <newsgroups> ... | 209 Usage: emacs -batch -l gnus -f gnus-batch-score <newsgroups> ... |
200 Newsgroups is a list of strings in Bnews format. If you want to score | 210 Newsgroups is a list of strings in Bnews format. If you want to score |
201 the comp hierarchy, you'd say \"comp.all\". If you would not like to | 211 the comp hierarchy, you'd say \"comp.all\". If you would not like to |
202 score the alt hierarchy, you'd say \"!alt.all\"." t nil) | 212 score the alt hierarchy, you'd say \"!alt.all\"." t nil)) |
203 | 213 |
204 ;;;*** | 214 ;;;*** |
205 | 215 |
206 (provide 'gnus-setup) | 216 (provide 'gnus-setup) |
207 | 217 |