*** empty log message ***
[gnus] / lisp / gnus-load.el
1 ;;; gnus-load.el --- various Gnus variables
2 ;; Copyright (C) 1996 Free Software Foundation, Inc.
3
4 ;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
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
26 ;;; Code:
27
28 (require 'gnus-util)
29 (require 'nnheader)
30
31 (defvar gnus-directory (or (getenv "SAVEDIR") "~/News/")
32   "*Directory variable from which all other Gnus file variables are derived.")
33
34 (defvar gnus-default-directory nil
35   "*Default directory for all Gnus buffers.")
36
37 ;; Site dependent variables.  These variables should be defined in
38 ;; paths.el.
39
40 (defvar gnus-default-nntp-server nil
41   "Specify a default NNTP server.
42 This variable should be defined in paths.el, and should never be set
43 by the user.
44 If you want to change servers, you should use `gnus-select-method'.
45 See the documentation to that variable.")
46
47 ;; Don't touch this variable.
48 (defvar gnus-nntp-service "nntp"
49   "*NNTP service name (\"nntp\" or 119).
50 This is an obsolete variable, which is scarcely used.  If you use an
51 nntp server for your newsgroup and want to change the port number
52 used to 899, you would say something along these lines:
53
54  (setq gnus-select-method '(nntp \"my.nntp.server\" (nntp-port-number 899)))")
55
56 (defvar gnus-nntpserver-file "/etc/nntpserver"
57   "*A file with only the name of the nntp server in it.")
58
59 ;; This function is used to check both the environment variable
60 ;; NNTPSERVER and the /etc/nntpserver file to see whether one can find
61 ;; an nntp server name default.
62 (defun gnus-getenv-nntpserver ()
63   (or (getenv "NNTPSERVER")
64       (and (file-readable-p gnus-nntpserver-file)
65            (save-excursion
66              (set-buffer (get-buffer-create " *gnus nntp*"))
67              (buffer-disable-undo (current-buffer))
68              (insert-file-contents gnus-nntpserver-file)
69              (let ((name (buffer-string)))
70                (prog1
71                    (if (string-match "^[ \t\n]*$" name)
72                        nil
73                      name)
74                  (kill-buffer (current-buffer))))))))
75
76 (defvar gnus-select-method
77   (nconc
78    (list 'nntp (or (condition-case ()
79                        (gnus-getenv-nntpserver)
80                      (error nil))
81                    (if (and gnus-default-nntp-server
82                             (not (string= gnus-default-nntp-server "")))
83                        gnus-default-nntp-server)
84                    (system-name)))
85    (if (or (null gnus-nntp-service)
86            (equal gnus-nntp-service "nntp"))
87        nil
88      (list gnus-nntp-service)))
89   "*Default method for selecting a newsgroup.
90 This variable should be a list, where the first element is how the
91 news is to be fetched, the second is the address.
92
93 For instance, if you want to get your news via NNTP from
94 \"flab.flab.edu\", you could say:
95
96 (setq gnus-select-method '(nntp \"flab.flab.edu\"))
97
98 If you want to use your local spool, say:
99
100 (setq gnus-select-method (list 'nnspool (system-name)))
101
102 If you use this variable, you must set `gnus-nntp-server' to nil.
103
104 There is a lot more to know about select methods and virtual servers -
105 see the manual for details.")
106
107 (defvar gnus-message-archive-method 
108   `(nnfolder
109     "archive"
110     (nnfolder-directory ,(nnheader-concat message-directory "archive"))
111     (nnfolder-active-file 
112      ,(nnheader-concat message-directory "archive/active"))
113     (nnfolder-get-new-mail nil)
114     (nnfolder-inhibit-expiry t))
115   "*Method used for archiving messages you've sent.
116 This should be a mail method.
117
118 It's probably not a very effective to change this variable once you've
119 run Gnus once.  After doing that, you must edit this server from the
120 server buffer.")
121
122 (defvar gnus-message-archive-group nil
123   "*Name of the group in which to save the messages you've written.
124 This can either be a string, a list of strings; or an alist
125 of regexps/functions/forms to be evaluated to return a string (or a list
126 of strings).  The functions are called with the name of the current
127 group (or nil) as a parameter.
128
129 If you want to save your mail in one group and the news articles you
130 write in another group, you could say something like:
131
132  \(setq gnus-message-archive-group 
133         '((if (message-news-p)
134               \"misc-news\" 
135             \"misc-mail\")))
136
137 Normally the group names returned by this variable should be
138 unprefixed -- which implicitly means \"store on the archive server\".
139 However, you may wish to store the message on some other server.  In
140 that case, just return a fully prefixed name of the group --
141 \"nnml+private:mail.misc\", for instance.")
142
143 (defvar gnus-secondary-servers nil
144   "*List of NNTP servers that the user can choose between interactively.
145 To make Gnus query you for a server, you have to give `gnus' a
146 non-numeric prefix - `C-u M-x gnus', in short.")
147
148 (defvar gnus-nntp-server nil
149   "*The name of the host running the NNTP server.
150 This variable is semi-obsolete.  Use the `gnus-select-method'
151 variable instead.")
152
153 (defvar gnus-secondary-select-methods nil
154   "*A list of secondary methods that will be used for reading news.
155 This is a list where each element is a complete select method (see
156 `gnus-select-method').
157
158 If, for instance, you want to read your mail with the nnml backend,
159 you could set this variable:
160
161 (setq gnus-secondary-select-methods '((nnml \"\")))")
162
163 (defvar gnus-backup-default-subscribed-newsgroups
164   '("news.announce.newusers" "news.groups.questions" "gnu.emacs.gnus")
165   "Default default new newsgroups the first time Gnus is run.
166 Should be set in paths.el, and shouldn't be touched by the user.")
167
168 (defvar gnus-local-domain nil
169   "Local domain name without a host name.
170 The DOMAINNAME environment variable is used instead if it is defined.
171 If the `system-name' function returns the full Internet name, there is
172 no need to set this variable.")
173
174 (defvar gnus-local-organization nil
175   "String with a description of what organization (if any) the user belongs to.
176 The ORGANIZATION environment variable is used instead if it is defined.
177 If this variable contains a function, this function will be called
178 with the current newsgroup name as the argument.  The function should
179 return a string.
180
181 In any case, if the string (either in the variable, in the environment
182 variable, or returned by the function) is a file name, the contents of
183 this file will be used as the organization.")
184
185 ;; Customization variables
186
187 (defvar gnus-refer-article-method nil
188   "*Preferred method for fetching an article by Message-ID.
189 If you are reading news from the local spool (with nnspool), fetching
190 articles by Message-ID is painfully slow.  By setting this method to an
191 nntp method, you might get acceptable results.
192
193 The value of this variable must be a valid select method as discussed
194 in the documentation of `gnus-select-method'.")
195
196 (defvar gnus-group-faq-directory
197   '("/ftp@mirrors.aol.com:/pub/rtfm/usenet/"
198     "/ftp@sunsite.auc.dk:/pub/usenet/"
199     "/ftp@sunsite.doc.ic.ac.uk:/pub/usenet/news-faqs/"
200     "/ftp@src.doc.ic.ac.uk:/usenet/news-FAQS/"
201     "/ftp@ftp.seas.gwu.edu:/pub/rtfm/"
202     "/ftp@rtfm.mit.edu:/pub/usenet/"
203     "/ftp@ftp.uni-paderborn.de:/pub/FAQ/"
204     "/ftp@ftp.sunet.se:/pub/usenet/"
205     "/ftp@nctuccca.edu.tw:/USENET/FAQ/"
206     "/ftp@hwarang.postech.ac.kr:/pub/usenet/"
207     "/ftp@ftp.hk.super.net:/mirror/faqs/")
208   "*Directory where the group FAQs are stored.
209 This will most commonly be on a remote machine, and the file will be
210 fetched by ange-ftp.
211
212 This variable can also be a list of directories.  In that case, the
213 first element in the list will be used by default.  The others can
214 be used when being prompted for a site.
215
216 Note that Gnus uses an aol machine as the default directory.  If this
217 feels fundamentally unclean, just think of it as a way to finally get
218 something of value back from them.
219
220 If the default site is too slow, try one of these:
221
222    North America: mirrors.aol.com                /pub/rtfm/usenet
223                   ftp.seas.gwu.edu               /pub/rtfm
224                   rtfm.mit.edu                   /pub/usenet
225    Europe:        ftp.uni-paderborn.de           /pub/FAQ
226                   src.doc.ic.ac.uk               /usenet/news-FAQS
227                   ftp.sunet.se                   /pub/usenet
228                   sunsite.auc.dk                 /pub/usenet
229    Asia:          nctuccca.edu.tw                /USENET/FAQ
230                   hwarang.postech.ac.kr          /pub/usenet
231                   ftp.hk.super.net               /mirror/faqs")
232
233 (defvar gnus-use-cross-reference t
234   "*Non-nil means that cross referenced articles will be marked as read.
235 If nil, ignore cross references.  If t, mark articles as read in
236 subscribed newsgroups.  If neither t nor nil, mark as read in all
237 newsgroups.")
238
239 (defvar gnus-process-mark ?#
240   "*Process mark.")
241
242 (defvar gnus-asynchronous nil
243   "*If non-nil, Gnus will supply backends with data needed for async article fetching.")
244
245 (defvar gnus-large-newsgroup 200
246   "*The number of articles which indicates a large newsgroup.
247 If the number of articles in a newsgroup is greater than this value,
248 confirmation is required for selecting the newsgroup.")
249
250 (defvar gnus-use-long-file-name (not (memq system-type '(usg-unix-v xenix)))
251   "*Non-nil means that the default name of a file to save articles in is the group name.
252 If it's nil, the directory form of the group name is used instead.
253
254 If this variable is a list, and the list contains the element
255 `not-score', long file names will not be used for score files; if it
256 contains the element `not-save', long file names will not be used for
257 saving; and if it contains the element `not-kill', long file names
258 will not be used for kill files.
259
260 Note that the default for this variable varies according to what system
261 type you're using.  On `usg-unix-v' and `xenix' this variable defaults
262 to nil while on all other systems it defaults to t.")
263
264 (defvar gnus-kill-files-directory gnus-directory
265   "*Name of the directory where kill files will be stored (default \"~/News\").")
266
267 (defvar gnus-save-score nil
268   "*If non-nil, save group scoring info.")
269
270 (defvar gnus-use-undo t
271   "*If non-nil, allow undoing in Gnus group mode buffers.")
272
273 (defvar gnus-use-adaptive-scoring nil
274   "*If non-nil, use some adaptive scoring scheme.
275 If a list, then the values `word' and `line' are meaningful.  The
276 former will perform adaption on individual words in the subject
277 header while `line' will perform adaption on several headers.")
278
279 (defvar gnus-use-cache 'passive
280   "*If nil, Gnus will ignore the article cache.
281 If `passive', it will allow entering (and reading) articles
282 explicitly entered into the cache.  If anything else, use the
283 cache to the full extent of the law.")
284
285 (defvar gnus-use-trees nil
286   "*If non-nil, display a thread tree buffer.")
287
288 (defvar gnus-use-grouplens nil
289   "*If non-nil, use GroupLens ratings.")
290
291 (defvar gnus-keep-backlog nil
292   "*If non-nil, Gnus will keep read articles for later re-retrieval.
293 If it is a number N, then Gnus will only keep the last N articles
294 read.  If it is neither nil nor a number, Gnus will keep all read
295 articles.  This is not a good idea.")
296
297 (defvar gnus-use-nocem nil
298   "*If non-nil, Gnus will read NoCeM cancel messages.")
299
300 (defvar gnus-suppress-duplicates nil
301   "*If non-nil, Gnus will mark duplicate copies of the same article as read.")
302
303 (defvar gnus-use-demon nil
304   "If non-nil, Gnus might use some demons.")
305
306 (defvar gnus-use-scoring t
307   "*If non-nil, enable scoring.")
308
309 (defvar gnus-use-picons nil
310   "*If non-nil, display picons.")
311
312 (defvar gnus-summary-prepare-exit-hook nil
313   "*A hook called when preparing to exit from the summary buffer.
314 It calls `gnus-summary-expire-articles' by default.")
315 (add-hook 'gnus-summary-prepare-exit-hook 'gnus-summary-expire-articles)
316
317 (defvar gnus-novice-user t
318   "*Non-nil means that you are a usenet novice.
319 If non-nil, verbose messages may be displayed and confirmations may be
320 required.")
321
322 (defvar gnus-expert-user nil
323   "*Non-nil means that you will never be asked for confirmation about anything.
324 And that means *anything*.")
325
326 (defvar gnus-interactive-catchup t
327   "*If non-nil, require your confirmation when catching up a group.")
328
329 (defvar gnus-interactive-exit t
330   "*If non-nil, require your confirmation when exiting Gnus.")
331
332 (defvar gnus-extract-address-components 'gnus-extract-address-components
333   "*Function for extracting address components from a From header.
334 Two pre-defined function exist: `gnus-extract-address-components',
335 which is the default, quite fast, and too simplistic solution, and
336 `mail-extract-address-components', which works much better, but is
337 slower.")
338
339 (defvar gnus-carpal nil
340   "*If non-nil, display clickable icons.")
341
342 (defvar gnus-shell-command-separator ";"
343   "String used to separate to shell commands.")
344
345 (defvar gnus-valid-select-methods
346   '(("nntp" post address prompt-address)
347     ("nnspool" post address)
348     ("nnvirtual" post-mail virtual prompt-address)
349     ("nnmbox" mail respool address)
350     ("nnml" mail respool address)
351     ("nnmh" mail respool address)
352     ("nndir" post-mail prompt-address)
353     ("nneething" none address prompt-address)
354     ("nndoc" none address prompt-address)
355     ("nnbabyl" mail address respool)
356     ("nnkiboze" post virtual)
357     ("nnsoup" post-mail address)
358     ("nndraft" post-mail)
359     ("nnfolder" mail respool address)
360     ("nngateway" none address prompt-address)
361     ("nnweb" none))
362   "An alist of valid select methods.
363 The first element of each list lists should be a string with the name
364 of the select method.  The other elements may be the category of
365 this method (i. e., `post', `mail', `none' or whatever) or other
366 properties that this method has (like being respoolable).
367 If you implement a new select method, all you should have to change is
368 this variable.  I think.")
369
370 (defvar gnus-updated-mode-lines '(group article summary tree)
371   "*List of buffers that should update their mode lines.
372 The list may contain the symbols `group', `article' and `summary'.  If
373 the corresponding symbol is present, Gnus will keep that mode line
374 updated with information that may be pertinent.
375 If this variable is nil, screen refresh may be quicker.")
376
377 ;; Added by Keinonen Kari <kk85613@cs.tut.fi>.
378 (defvar gnus-mode-non-string-length nil
379   "*Max length of mode-line non-string contents.
380 If this is nil, Gnus will take space as is needed, leaving the rest
381 of the modeline intact.")
382
383 (defvar gnus-auto-expirable-newsgroups nil
384   "*Groups in which to automatically mark read articles as expirable.
385 If non-nil, this should be a regexp that should match all groups in
386 which to perform auto-expiry.  This only makes sense for mail groups.")
387
388 (defvar gnus-total-expirable-newsgroups nil
389   "*Groups in which to perform expiry of all read articles.
390 Use with extreme caution.  All groups that match this regexp will be
391 expiring - which means that all read articles will be deleted after
392 (say) one week.  (This only goes for mail groups and the like, of
393 course.)")
394
395 (defvar gnus-group-uncollapsed-levels 1
396   "Number of group name elements to leave alone when making a short group name.")
397
398 (defvar gnus-group-use-permanent-levels nil
399   "*If non-nil, once you set a level, Gnus will use this level.")
400
401 ;; Hooks.
402
403 (defvar gnus-load-hook nil
404   "*A hook run while Gnus is loaded.")
405
406 (defvar gnus-apply-kill-hook '(gnus-apply-kill-file)
407   "*A hook called to apply kill files to a group.
408 This hook is intended to apply a kill file to the selected newsgroup.
409 The function `gnus-apply-kill-file' is called by default.
410
411 Since a general kill file is too heavy to use only for a few
412 newsgroups, I recommend you to use a lighter hook function.  For
413 example, if you'd like to apply a kill file to articles which contains
414 a string `rmgroup' in subject in newsgroup `control', you can use the
415 following hook:
416
417  (setq gnus-apply-kill-hook
418       (list
419         (lambda ()
420           (cond ((string-match \"control\" gnus-newsgroup-name)
421                  (gnus-kill \"Subject\" \"rmgroup\")
422                  (gnus-expunge \"X\"))))))")
423
424 (defvar gnus-group-change-level-function nil
425   "Function run when a group level is changed.
426 It is called with three parameters -- GROUP, LEVEL and OLDLEVEL.")
427
428 ;;; Face thingies.
429
430 ;; The following is just helper functions and data, not meant to be set
431 ;; by the user.
432 (defun gnus-make-face (color)
433   ;; Create entry for face with COLOR.
434   (custom-face-lookup color nil nil nil nil nil))
435
436 (defvar gnus-face-light-name-list
437   '("light blue" "light cyan" "light yellow" "light pink"
438     "pale green" "beige" "orange" "magenta" "violet" "medium purple"
439     "turquoise"))
440
441 (defvar gnus-face-dark-name-list
442   '("MidnightBlue" "firebrick" "dark green" "OrangeRed" 
443     "dark khaki" "dark violet" "SteelBlue4"))
444 ; CornflowerBlue SeaGreen OrangeRed SteelBlue4 DeepPink3
445 ; DarkOlviveGreen4 
446
447 (defvar gnus-visual 
448   '(summary-highlight group-highlight article-highlight 
449                       mouse-face
450                       summary-menu group-menu article-menu
451                       tree-highlight menu highlight
452                       browse-menu server-menu
453                       page-marker tree-menu binary-menu pick-menu
454                       grouplens-menu)
455   "Enable visual features.
456 If `visual' is disabled, there will be no menus and few faces.  Most of
457 the visual customization options below will be ignored.  Gnus will use
458 less space and be faster as a result.")
459
460 (defvar gnus-mouse-face
461   (condition-case ()
462       (if (gnus-visual-p 'mouse-face 'highlight)
463           (if (boundp 'gnus-mouse-face)
464               gnus-mouse-face
465             'highlight)
466         'default)
467     (error nil))
468   "Face used for group or summary buffer mouse highlighting.
469 The line beneath the mouse pointer will be highlighted with this
470 face.")
471
472 (defvar gnus-article-display-hook
473   (if (and (string-match "xemacs" emacs-version)
474            (featurep 'xface))
475       '(gnus-article-hide-headers-if-wanted
476         gnus-article-hide-boring-headers
477         gnus-article-treat-overstrike
478         gnus-article-maybe-highlight
479         gnus-article-display-x-face)
480     '(gnus-article-hide-headers-if-wanted
481       gnus-article-hide-boring-headers
482       gnus-article-treat-overstrike
483       gnus-article-maybe-highlight))
484   "Controls how the article buffer will look.
485
486 If you leave the list empty, the article will appear exactly as it is
487 stored on the disk.  The list entries will hide or highlight various
488 parts of the article, making it easier to find the information you
489 want.")
490
491
492
493 \f
494 ;;; Internal variables
495
496 (defvar gnus-group-get-parameter-function 'gnus-group-get-parameter)
497 (defvar gnus-original-article-buffer " *Original Article*")
498 (defvar gnus-newsgroup-name nil)
499
500 (defvar gnus-current-select-method nil
501   "The current method for selecting a newsgroup.")
502
503 (defvar gnus-tree-buffer "*Tree*"
504   "Buffer where Gnus thread trees are displayed.")
505
506 ;; Dummy variable.
507 (defvar gnus-use-generic-from nil)
508
509 ;; Variable holding the user answers to all method prompts.
510 (defvar gnus-method-history nil)
511
512 ;; Variable holding the user answers to all group prompts.
513 (defvar gnus-group-history nil)
514
515 (defvar gnus-server-alist nil
516   "List of available servers.")
517
518 (defvar gnus-predefined-server-alist
519   `(("cache"
520      (nnspool "cache"
521               (nnspool-spool-directory "~/News/cache/")
522               (nnspool-nov-directory "~/News/cache/")
523               (nnspool-active-file "~/News/cache/active"))))
524   "List of predefined (convenience) servers.")
525
526 (defvar gnus-topic-indentation "") ;; Obsolete variable.
527
528 (defconst gnus-article-mark-lists
529   '((marked . tick) (replied . reply)
530     (expirable . expire) (killed . killed)
531     (bookmarks . bookmark) (dormant . dormant)
532     (scored . score) (saved . save)
533     (cached . cache)))
534
535 (defvar gnus-headers-retrieved-by nil)
536 (defvar gnus-article-reply nil)
537 (defvar gnus-override-method nil)
538 (defvar gnus-article-check-size nil)
539 (defvar gnus-opened-servers nil)
540
541 (defvar gnus-current-kill-article nil)
542
543 (defvar gnus-have-read-active-file nil)
544
545 (defconst gnus-maintainer
546   "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)"
547   "The mail address of the Gnus maintainers.")
548
549 (defvar gnus-info-nodes
550   '((gnus-group-mode "(gnus)The Group Buffer")
551     (gnus-summary-mode "(gnus)The Summary Buffer")
552     (gnus-article-mode "(gnus)The Article Buffer")
553     (mime/viewer-mode "(gnus)The Article Buffer")
554     (gnus-server-mode "(gnus)The Server Buffer")
555     (gnus-browse-mode "(gnus)Browse Foreign Server")
556     (gnus-tree-mode "(gnus)Tree Display"))
557   "Alist of major modes and related Info nodes.")
558
559 (defvar gnus-group-buffer "*Group*")
560 (defvar gnus-summary-buffer "*Summary*")
561 (defvar gnus-article-buffer "*Article*")
562 (defvar gnus-server-buffer "*Server*")
563
564 (defvar gnus-buffer-list nil
565   "Gnus buffers that should be killed on exit.")
566
567 (defvar gnus-slave nil
568   "Whether this Gnus is a slave or not.")
569
570 (defvar gnus-variable-list
571   '(gnus-newsrc-options gnus-newsrc-options-n
572     gnus-newsrc-last-checked-date
573     gnus-newsrc-alist gnus-server-alist
574     gnus-killed-list gnus-zombie-list
575     gnus-topic-topology gnus-topic-alist
576     gnus-format-specs)
577   "Gnus variables saved in the quick startup file.")
578
579 (defvar gnus-newsrc-alist nil
580   "Assoc list of read articles.
581 gnus-newsrc-hashtb should be kept so that both hold the same information.")
582
583 (defvar gnus-newsrc-hashtb nil
584   "Hashtable of gnus-newsrc-alist.")
585
586 (defvar gnus-killed-list nil
587   "List of killed newsgroups.")
588
589 (defvar gnus-killed-hashtb nil
590   "Hash table equivalent of gnus-killed-list.")
591
592 (defvar gnus-zombie-list nil
593   "List of almost dead newsgroups.")
594
595 (defvar gnus-description-hashtb nil
596   "Descriptions of newsgroups.")
597
598 (defvar gnus-list-of-killed-groups nil
599   "List of newsgroups that have recently been killed by the user.")
600
601 (defvar gnus-active-hashtb nil
602   "Hashtable of active articles.")
603
604 (defvar gnus-moderated-list nil
605   "List of moderated newsgroups.")
606
607 ;; Save window configuration.
608 (defvar gnus-prev-winconf nil)
609
610 (defvar gnus-reffed-article-number nil)
611
612 ;;; Let the byte-compiler know that we know about this variable.
613 (defvar rmail-default-rmail-file)
614
615 (defvar gnus-dead-summary nil)
616
617 ;;; End of variables.
618
619 ;; Define some autoload functions Gnus might use.
620 (eval-and-compile
621
622   ;; This little mapcar goes through the list below and marks the
623   ;; symbols in question as autoloaded functions.
624   (mapcar
625    (lambda (package)
626      (let ((interactive (nth 1 (memq ':interactive package))))
627        (mapcar
628         (lambda (function)
629           (let (keymap)
630             (when (consp function)
631               (setq keymap (car (memq 'keymap function)))
632               (setq function (car function)))
633             (autoload function (car package) nil interactive keymap)))
634         (if (eq (nth 1 package) ':interactive)
635             (cdddr package)
636           (cdr package)))))
637    '(("metamail" metamail-buffer)
638      ("info" Info-goto-node)
639      ("hexl" hexl-hex-string-to-integer)
640      ("pp" pp pp-to-string pp-eval-expression)
641      ("mail-extr" mail-extract-address-components)
642      ("nnmail" nnmail-split-fancy nnmail-article-group nnmail-date-to-time)
643      ("nnvirtual" nnvirtual-catchup-group nnvirtual-convert-headers)
644      ("timezone" timezone-make-date-arpa-standard timezone-fix-time
645       timezone-make-sortable-date timezone-make-time-string)
646      ("rmailout" rmail-output)
647      ("rmail" rmail-insert-rmail-file-header rmail-count-new-messages
648       rmail-show-message)
649      ("gnus-soup" :interactive t
650       gnus-group-brew-soup gnus-brew-soup gnus-soup-add-article
651       gnus-soup-send-replies gnus-soup-save-areas gnus-soup-pack-packet)
652      ("nnsoup" nnsoup-pack-replies)
653      ("score-mode" :interactive t gnus-score-mode)
654      ("gnus-mh" gnus-mh-mail-setup gnus-summary-save-article-folder
655       gnus-Folder-save-name gnus-folder-save-name)
656      ("gnus-mh" :interactive t gnus-summary-save-in-folder)
657      ("gnus-demon" gnus-demon-add-nocem gnus-demon-add-scanmail
658       gnus-demon-add-disconnection gnus-demon-add-handler
659       gnus-demon-remove-handler)
660      ("gnus-demon" :interactive t
661       gnus-demon-init gnus-demon-cancel)
662      ("gnus-salt" gnus-highlight-selected-tree gnus-possibly-generate-tree
663       gnus-tree-open gnus-tree-close gnus-carpal-setup-buffer)
664      ("gnus-nocem" gnus-nocem-scan-groups gnus-nocem-close
665       gnus-nocem-unwanted-article-p)
666      ("gnus-srvr" gnus-enter-server-buffer gnus-server-set-info)
667      ("gnus-srvr" gnus-browse-foreign-server)
668      ("gnus-cite" :interactive t
669       gnus-article-highlight-citation gnus-article-hide-citation-maybe
670       gnus-article-hide-citation gnus-article-fill-cited-article
671       gnus-article-hide-citation-in-followups)
672      ("gnus-kill" gnus-kill gnus-apply-kill-file-internal
673       gnus-kill-file-edit-file gnus-kill-file-raise-followups-to-author
674       gnus-execute gnus-expunge)
675      ("gnus-cache" gnus-cache-possibly-enter-article gnus-cache-save-buffers
676       gnus-cache-possibly-remove-articles gnus-cache-request-article
677       gnus-cache-retrieve-headers gnus-cache-possibly-alter-active
678       gnus-cache-enter-remove-article gnus-cached-article-p
679       gnus-cache-open gnus-cache-close gnus-cache-update-article)
680      ("gnus-cache" :interactive t gnus-jog-cache gnus-cache-enter-article
681       gnus-cache-remove-article gnus-summary-insert-cached-articles)
682      ("gnus-score" :interactive t
683       gnus-summary-increase-score gnus-summary-lower-score
684       gnus-score-flush-cache gnus-score-close
685       gnus-score-raise-same-subject-and-select
686       gnus-score-raise-same-subject gnus-score-default
687       gnus-score-raise-thread gnus-score-lower-same-subject-and-select
688       gnus-score-lower-same-subject gnus-score-lower-thread
689       gnus-possibly-score-headers gnus-summary-raise-score 
690       gnus-summary-set-score gnus-summary-current-score
691       gnus-score-followup-article)
692      ("gnus-score"
693       (gnus-summary-score-map keymap) gnus-score-save gnus-score-headers
694       gnus-current-score-file-nondirectory gnus-score-adaptive
695       gnus-score-find-trace gnus-score-file-name)
696      ("gnus-topic" :interactive t gnus-topic-mode)
697      ("gnus-topic" gnus-topic-remove-group)
698      ("gnus-salt" :interactive t gnus-pick-mode gnus-binary-mode)
699      ("gnus-uu" (gnus-uu-extract-map keymap) (gnus-uu-mark-map keymap))
700      ("gnus-uu" :interactive t
701       gnus-uu-digest-mail-forward gnus-uu-digest-post-forward
702       gnus-uu-mark-series gnus-uu-mark-region gnus-uu-mark-buffer
703       gnus-uu-mark-by-regexp gnus-uu-mark-all
704       gnus-uu-mark-sparse gnus-uu-mark-thread gnus-uu-decode-uu
705       gnus-uu-decode-uu-and-save gnus-uu-decode-unshar
706       gnus-uu-decode-unshar-and-save gnus-uu-decode-save
707       gnus-uu-decode-binhex gnus-uu-decode-uu-view
708       gnus-uu-decode-uu-and-save-view gnus-uu-decode-unshar-view
709       gnus-uu-decode-unshar-and-save-view gnus-uu-decode-save-view
710       gnus-uu-decode-binhex-view)
711      ("gnus-msg" (gnus-summary-send-map keymap)
712       gnus-mail-yank-original gnus-mail-send-and-exit
713       gnus-article-mail gnus-new-mail gnus-mail-reply
714       gnus-copy-article-buffer gnus-extended-version)
715      ("gnus-msg" :interactive t
716       gnus-group-post-news gnus-group-mail gnus-summary-post-news
717       gnus-summary-followup gnus-summary-followup-with-original
718       gnus-summary-cancel-article gnus-summary-supersede-article
719       gnus-post-news gnus-inews-news 
720       gnus-summary-reply gnus-summary-reply-with-original
721       gnus-summary-mail-forward gnus-summary-mail-other-window
722       gnus-bug)
723      ("gnus-picon" :interactive t gnus-article-display-picons
724       gnus-group-display-picons gnus-picons-article-display-x-face
725       gnus-picons-display-x-face)
726      ("gnus-gl" bbb-login bbb-logout bbb-grouplens-group-p 
727       gnus-grouplens-mode)
728      ("smiley" :interactive t gnus-smiley-display)
729      ("gnus" gnus-add-current-to-buffer-list gnus-add-shutdown)
730      ("gnus-win" gnus-configure-windows)
731      ("gnus-sum" gnus-summary-insert-line gnus-summary-read-group
732       gnus-list-of-unread-articles gnus-list-of-read-articles
733       gnus-offer-save-summaries gnus-make-thread-indent-array
734       gnus-summary-exit gnus-update-read-articles)
735      ("gnus-group" gnus-group-insert-group-line gnus-group-quit
736       gnus-group-list-groups gnus-group-first-unread-group
737       gnus-group-set-mode-line gnus-group-set-info gnus-group-save-newsrc
738       gnus-group-setup-buffer gnus-group-get-new-news
739       gnus-group-make-help-group gnus-group-update-group)
740      ("gnus-bcklg" gnus-backlog-request-article gnus-backlog-enter-article
741       gnus-backlog-remove-article) 
742      ("gnus-art" gnus-article-read-summary-keys gnus-article-save
743       gnus-article-prepare gnus-article-set-window-start
744       gnus-article-show-all-headers gnus-article-next-page
745       gnus-article-prev-page gnus-request-article-this-buffer
746       gnus-article-mode gnus-article-setup-buffer gnus-narrow-to-page)
747      ("gnus-art" :interactive t
748       gnus-article-hide-headers gnus-article-hide-boring-headers
749       gnus-article-treat-overstrike gnus-article-word-wrap
750       gnus-article-remove-cr gnus-article-remove-trailing-blank-lines
751       gnus-article-display-x-face gnus-article-de-quoted-unreadable
752       gnus-article-mime-decode-quoted-printable gnus-article-hide-pgp
753       gnus-article-hide-pem gnus-article-hide-signature
754       gnus-article-strip-leading-blank-lines gnus-article-date-local
755       gnus-article-date-original gnus-article-date-lapsed
756       gnus-decode-rfc1522 gnus-article-show-all-headers
757       gnus-article-edit-mode gnus-article-edit-article
758       gnus-article-edit-done)
759      ("gnus-int" gnus-request-type)
760      ("gnus-start" gnus-newsrc-parse-options gnus-1 gnus-no-server-1
761       gnus-dribble-enter)
762      ("gnus-dup" gnus-dup-suppress-articles gnus-dup-enter-articles)
763      ("gnus-range" gnus-copy-sequence)
764      ("gnus-vm" gnus-vm-mail-setup)
765      ("gnus-eform" gnus-edit-form)
766      ("gnus-move" :interactive t
767       gnus-group-move-group-to-server gnus-change-server)
768      ("gnus-logic" gnus-score-advanced)
769      ("gnus-undo" gnus-undo-mode gnus-undo-register 
770       gnus-dup-unsuppress-article)
771      ("gnus-async" gnus-async-request-fetched-article gnus-async-prefetch-next
772       gnus-async-prefetch-article gnus-async-prefetch-remove-group)
773      ("article" article-decode-rfc1522)
774      ("gnus-vm" :interactive t gnus-summary-save-in-vm
775       gnus-summary-save-article-vm))))
776
777 ;;; gnus-sum.el thingies
778
779
780 (defvar gnus-summary-line-format "%U\%R\%z\%I\%(%[%4L: %-20,20n%]%) %s\n"
781   "*The format specification of the lines in the summary buffer.
782
783 It works along the same lines as a normal formatting string,
784 with some simple extensions.
785
786 %N   Article number, left padded with spaces (string)
787 %S   Subject (string)
788 %s   Subject if it is at the root of a thread, and \"\" otherwise (string)
789 %n   Name of the poster (string)
790 %a   Extracted name of the poster (string)
791 %A   Extracted address of the poster (string)
792 %F   Contents of the From: header (string)
793 %x   Contents of the Xref: header (string)
794 %D   Date of the article (string)
795 %d   Date of the article (string) in DD-MMM format
796 %M   Message-id of the article (string)
797 %r   References of the article (string)
798 %c   Number of characters in the article (integer)
799 %L   Number of lines in the article (integer)
800 %I   Indentation based on thread level (a string of spaces)
801 %T   A string with two possible values: 80 spaces if the article
802      is on thread level two or larger and 0 spaces on level one
803 %R   \"A\" if this article has been replied to, \" \" otherwise (character)
804 %U   Status of this article (character, \"R\", \"K\", \"-\" or \" \")
805 %[   Opening bracket (character, \"[\" or \"<\")
806 %]   Closing bracket (character, \"]\" or \">\")
807 %>   Spaces of length thread-level (string)
808 %<   Spaces of length (- 20 thread-level) (string)
809 %i   Article score (number)
810 %z   Article zcore (character)
811 %t   Number of articles under the current thread (number).
812 %e   Whether the thread is empty or not (character).
813 %l   GroupLens score (string).
814 %P   The line number (number).
815 %u   User defined specifier.  The next character in the format string should
816      be a letter.  Gnus will call the function gnus-user-format-function-X,
817      where X is the letter following %u.  The function will be passed the
818      current header as argument.  The function should return a string, which
819      will be inserted into the summary just like information from any other
820      summary specifier.
821
822 Text between %( and %) will be highlighted with `gnus-mouse-face'
823 when the mouse point is placed inside the area.  There can only be one
824 such area.
825
826 The %U (status), %R (replied) and %z (zcore) specs have to be handled
827 with care.  For reasons of efficiency, Gnus will compute what column
828 these characters will end up in, and \"hard-code\" that.  This means that
829 it is illegal to have these specs after a variable-length spec.  Well,
830 you might not be arrested, but your summary buffer will look strange,
831 which is bad enough.
832
833 The smart choice is to have these specs as for to the left as
834 possible.
835
836 This restriction may disappear in later versions of Gnus.")
837
838 ;;;
839 ;;; Skeleton keymaps
840 ;;;
841
842 (defun gnus-suppress-keymap (keymap)
843   (suppress-keymap keymap)
844   (let ((keys `([delete] "\177" "\M-u"))) ;gnus-mouse-2 
845     (while keys
846       (define-key keymap (pop keys) 'undefined))))
847
848 (defvar gnus-article-mode-map (make-keymap))
849 (gnus-suppress-keymap gnus-article-mode-map)
850 (defvar gnus-summary-mode-map (make-keymap))
851 (gnus-suppress-keymap gnus-summary-mode-map)
852 (defvar gnus-group-mode-map (make-keymap))
853 (gnus-suppress-keymap gnus-group-mode-map)
854
855 ;;; Function aliases later to be redefined for XEmacs usage.
856
857 (defalias 'gnus-make-overlay 'make-overlay)
858 (defalias 'gnus-overlay-put 'overlay-put)
859 (defalias 'gnus-move-overlay 'move-overlay)
860 (defalias 'gnus-overlay-end 'overlay-end)
861 (defalias 'gnus-extent-detached-p 'ignore)
862 (defalias 'gnus-extent-start-open 'ignore)
863 (defalias 'gnus-set-text-properties 'set-text-properties)
864 (defalias 'gnus-group-remove-excess-properties 'ignore)
865 (defalias 'gnus-topic-remove-excess-properties 'ignore)
866 (defalias 'gnus-appt-select-lowest-window 'appt-select-lowest-window)
867 (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)
868 (defalias 'gnus-make-local-hook 'make-local-hook)
869 (defalias 'gnus-add-hook 'add-hook)
870 (defalias 'gnus-character-to-event 'identity)
871 (defalias 'gnus-add-text-properties 'add-text-properties)
872 (defalias 'gnus-put-text-property 'put-text-property)
873 (defalias 'gnus-mode-line-buffer-identification 'identity)
874
875 (provide 'gnus-load)
876
877 ;;; gnus-load.el ends here