*** empty log message ***
[gnus] / lisp / gnus.el
index 3aa6b16..3c1275a 100644 (file)
@@ -1,8 +1,8 @@
-;;; (ding) Gnus: a newsreader for GNU Emacs
+;;; gnus.el --- a newsreader for GNU Emacs
 ;; Copyright (C) 1987,88,89,90,93,94,95 Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
 ;; Copyright (C) 1987,88,89,90,93,94,95 Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
-;;     Lars Ingebrigtsen <larsi@ifi.uio.no>
+;;     Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
 ;; Keywords: news
 
 ;; This file is part of GNU Emacs.
 ;; Keywords: news
 
 ;; This file is part of GNU Emacs.
@@ -26,7 +26,7 @@
 ;; Although (ding) Gnus looks suspiciously like GNUS, it isn't quite
 ;; the same beast. Most internal structures have been changed. If you
 ;; have written packages that depend on any of the hash tables,
 ;; Although (ding) Gnus looks suspiciously like GNUS, it isn't quite
 ;; the same beast. Most internal structures have been changed. If you
 ;; have written packages that depend on any of the hash tables,
-;; `gnus-newsrc-assoc', `gnus-killed-assoc', marked lists, the .newsrc
+;; `gnus-newsrc-alist', `gnus-killed-assoc', marked lists, the .newsrc
 ;; buffer, or internal knowledge of the `nntp-header-' macros, or
 ;; dependence on the buffers having a certain format, your code will
 ;; fail.
 ;; buffer, or internal knowledge of the `nntp-header-' macros, or
 ;; dependence on the buffers having a certain format, your code will
 ;; fail.
 ;;; Code:
 
 (require 'mail-utils)
 ;;; Code:
 
 (require 'mail-utils)
-(require 'rnews)
-(require 'rmail)
 (require 'timezone)
 (require 'timezone)
-
 (require 'nnheader)
 (require 'nnheader)
-(require 'nnmail)
+(require 'gnus-ems)
+
+;; Site dependent variables. These variables should be defined in
+;; paths.el.
+
+(defvar gnus-default-nntp-server nil
+  "Specify a default NNTP server.
+This variable should be defined in paths.el, and should never be set
+by the user.
+If you want to change servers, you should use `gnus-select-method'.
+See the documentation to that variable.")
+
+(defconst gnus-backup-default-subscribed-newsgroups 
+  '("news.announce.newusers" "news.groups.questions" "gnu.emacs.gnus")
+  "Default default new newsgroups the first time Gnus is run.
+Should be set in paths.el, and shouldn't be touched by the user.")
+
+(defvar gnus-local-domain nil
+  "Local domain name without a host name.
+The DOMAINNAME environment variable is used instead if it is defined.
+If the `system-name' function returns the full Internet name, there is
+no need to set this variable.")
+
+(defvar gnus-local-organization nil
+  "String with a description of what organization (if any) the user belongs to.
+The ORGANIZATION environment variable is used instead if it is defined.
+If this variable contains a function, this function will be called
+with the current newsgroup name as the argument. The function should
+return a string.
+In any case, if the string (either in the variable, in the environment
+variable, or returned by the function) is a file name, the contents of
+this file will be used as the organization.")
+
+(defvar gnus-use-generic-from nil
+  "If nil, the full host name will be the system name prepended to the domain name.
+If this is a string, the full host name will be this string.
+If this is non-nil, non-string, the domain name will be used as the
+full host name.")
+
+(defvar gnus-use-generic-path nil
+  "If nil, use the NNTP server name in the Path header.
+If stringp, use this; if non-nil, use no host name (user name only).")
+
 
 ;; Customization variables
 
 
 ;; Customization variables
 
                  (if (and gnus-default-nntp-server
                           (not (string= gnus-default-nntp-server "")))
                      gnus-default-nntp-server)
                  (if (and gnus-default-nntp-server
                           (not (string= gnus-default-nntp-server "")))
                      gnus-default-nntp-server)
-                 (system-name))
-       "nntp")
-  "Default method for selecting a newsgroup.
+                 (system-name)))
+  "*Default method for selecting a newsgroup.
 This variable should be a list, where the first element is how the
 This variable should be a list, where the first element is how the
-news is to be fetched, the second is the address, and the optional
-third element is the \"port number\", if nntp is used.
+news is to be fetched, the second is the address. 
 
 For instance, if you want to get your news via NNTP from
 
 For instance, if you want to get your news via NNTP from
-\"flab.flab.edu\" on port 23, you could say:
+\"flab.flab.edu\", you could say:
 
 
-(setq gnus-select-method '(nntp \"flab.flab.edu\" 23))
+(setq gnus-select-method '(nntp \"flab.flab.edu\"))
 
 If you want to use your local spool, say:
 
 (setq gnus-select-method (list 'nnspool (system-name)))
 
 
 If you want to use your local spool, say:
 
 (setq gnus-select-method (list 'nnspool (system-name)))
 
-If you use this variable, you must set `gnus-nntp-server' to nil.")
+If you use this variable, you must set `gnus-nntp-server' to nil.
+
+There is a lot more to know about select methods and virtual servers -
+see the manual for details.")
 
 ;; Added by Sudish Joseph <joseph@cis.ohio-state.edu>.
 (defvar gnus-post-method nil
 
 ;; Added by Sudish Joseph <joseph@cis.ohio-state.edu>.
 (defvar gnus-post-method nil
-  "Preferred method for posting USENET news.
-If this variable is nil, GNUS will use the current method to decide
+  "*Preferred method for posting USENET news.
+If this variable is nil, Gnus will use the current method to decide
 which method to use when posting.  If it is non-nil, it will override
 the current method. This method will not be used in mail groups and
 the like, only in \"real\" newsgroups.
 which method to use when posting.  If it is non-nil, it will override
 the current method. This method will not be used in mail groups and
 the like, only in \"real\" newsgroups.
@@ -77,15 +117,29 @@ the like, only in \"real\" newsgroups.
 The value must be a valid method as discussed in the documentation of
 `gnus-select-method'.")
 
 The value must be a valid method as discussed in the documentation of
 `gnus-select-method'.")
 
-(defvar gnus-default-nntp-server nil
-  "Specify a default NNTP server.
-This variable should be defined in paths.el.")
+(defvar gnus-refer-article-method nil
+  "*Preferred method for fetching an article by Message-ID.
+If you are reading news from the local spool (with nnspool), fetching
+articles by Message-ID is painfully slow. By setting this method to an
+nntp method, you might get acceptable results.
+
+The value of this variable must be a valid select method as discussed
+in the documentation of `gnus-select-method'")
+
+(defvar gnus-secondary-select-methods nil
+  "*A list of secondary methods that will be used for reading news.
+This is a list where each element is a complete select methdod (see
+`gnus-select-method').  
+
+If, for instance, you want to read your mail with the nnml backend,
+you could set this variable:
+
+(setq gnus-secondary-select-methods '((nnml \"\"))")
 
 (defvar gnus-secondary-servers nil
 
 (defvar gnus-secondary-servers nil
-  "List of NNTP servers that the user can choose between interactively.
-The list should contain lists, where each list contains the name of
-the server. To make Gnus query you for a server, you have to give
-`gnus' a non-numeric prefix - `C-u M-x gnus', in short.")
+  "*List of NNTP servers that the user can choose between interactively.
+To make Gnus query you for a server, you have to give `gnus' a
+non-numeric prefix - `C-u M-x gnus', in short.")
 
 (defvar gnus-nntp-server nil
   "*The name of the host running the NNTP server.
 
 (defvar gnus-nntp-server nil
   "*The name of the host running the NNTP server.
@@ -93,113 +147,90 @@ This variable is semi-obsolete. Use the `gnus-select-method'
 variable instead.")
 
 (defvar gnus-nntp-service "nntp"
 variable instead.")
 
 (defvar gnus-nntp-service "nntp"
-  "NNTP service name (\"nntp\" or 119).
+  "*NNTP service name (\"nntp\" or 119).
 This is an obsolete variable, which is scarcely used. If you use an
 nntp server for your newsgroup and want to change the port number
 used to 899, you would say something along these lines:
 
 This is an obsolete variable, which is scarcely used. If you use an
 nntp server for your newsgroup and want to change the port number
 used to 899, you would say something along these lines:
 
-(setq gnus-select-method '(nntp \"my.nntp.server\" 899))")
+ (setq gnus-select-method '(nntp \"my.nntp.server\" (nntp-port-number 899)))")
 
 (defvar gnus-startup-file "~/.newsrc"
 
 (defvar gnus-startup-file "~/.newsrc"
-  "Your `.newsrc' file.  Use `.newsrc-SERVER' instead if it exists.")
-
-(defvar gnus-signature-file "~/.signature"
-  "Your `.signature' file.")
+  "*Your `.newsrc' file.
+`.newsrc-SERVER' will be used instead if that exists.")
 
 (defvar gnus-init-file "~/.gnus"
 
 (defvar gnus-init-file "~/.gnus"
-  "Your Gnus elisp startup file.
-If a file with the .el or .elc suffixes exist, they will be read
+  "*Your Gnus elisp startup file.
+If a file with the .el or .elc suffixes exist, it will be read
 instead.") 
 
 instead.") 
 
+(defvar gnus-group-faq-directory
+  "/anonymous@rtfm.mit.edu:/pub/usenet-by-group/"
+  "*Directory where the group FAQs are stored.
+This will most commonly be on a remote machine, and the file will be
+fetched by ange-ftp.")
+
+(defvar gnus-group-archive-directory
+  "/ftp@sina.tcamc.uh.edu:/pub/emacs/ding-list/" 
+  "*The address of the (ding) archives.")
+
 (defvar gnus-default-subscribed-newsgroups nil
 (defvar gnus-default-subscribed-newsgroups nil
-  "This variable lists what newsgroups should be susbcribed the first time Gnus is used.
+  "*This variable lists what newsgroups should be subscribed the first time Gnus is used.
 It should be a list of strings.
 If it is `t', Gnus will not do anything special the first time it is
 started; it'll just use the normal newsgroups subscription methods.")
 
 It should be a list of strings.
 If it is `t', Gnus will not do anything special the first time it is
 started; it'll just use the normal newsgroups subscription methods.")
 
-(defconst gnus-backup-default-subscribed-newsgroups 
-  '("news.announce.newusers" "news.groups.questions")
-  "Default default new newsgroups the first time Gnus is run.")
-
-(defvar gnus-post-prepare-function nil
-  "Function that is run after a post buffer has been prepared.
-It is called with the name of the newsgroup that is posted to. It
-might be use, for instance, for inserting signatures based on the
-newsgroup name. (In that case, `gnus-signature-file' and
-`mail-signature' should both be set to nil).")
-
 (defvar gnus-use-cross-reference t
 (defvar gnus-use-cross-reference t
-  "Non-nil means that cross referenced articles will be marked as read.
+  "*Non-nil means that cross referenced articles will be marked as read.
 If nil, ignore cross references.  If t, mark articles as read in
 If nil, ignore cross references.  If t, mark articles as read in
-all newsgroups.")
-
-(defvar gnus-use-followup-to 'use
-  "Specifies what to do with Followup-To field.
-If nil, ignore the field. If it is t, use its value, but ignore 
-`poster'. If it is neither nil nor t, always use the value.")
-
-(defvar gnus-followup-to-function nil
-  "A variable that contains a function that returns a followup address.
-The function will be called in the buffer of the article that is being
-followed up. The buffer will be narrowed to the headers of the
-article. To pick header fields, one might use `mail-fetch-field'.  The
-function will be called with the name of the current newsgroup as the
-argument.
-
-Here's an example `gnus-followup-to-function':
-
-(setq gnus-followup-to-function
-      (lambda (group)
-       (cond ((string= group \"mail.list\")
-              (or (mail-fetch-field \"sender\") 
-                  (mail-fetch-field \"from\")))
-             (t
-              (or (mail-fetch-field \"reply-to\") 
-                  (mail-fetch-field \"from\"))))))")
+subscribed newsgroups. If neither t nor nil, mark as read in all
+newsgroups.") 
 
 
-(defvar gnus-reply-to-function nil
-  "A variable that contains a function that returns a reply address.
-See the `gnus-followup-to-function' variable for an explanation of how
-this variable is used.")
+(defvar gnus-use-dribble-file t
+  "*Non-nil means that Gnus will use a dribble file to store user updates.
+If Emacs should crash without saving the .newsrc files, complete
+information can be restored from the dribble file.")
 
 
-(defvar gnus-large-newsgroup 200
-  "The number of articles which indicates a large newsgroup.
-If the number of articles in a newsgroup is greater than the value,
-confirmation is required for selecting the newsgroup.")
+(defvar gnus-asynchronous nil
+  "*If non-nil, Gnus will supply backends with data needed for async article fetching.")
 
 
-(defvar gnus-author-copy (getenv "AUTHORCOPY")
-  "Name of the file the article will be saved before it is posted using the FCC: field.
-Initialized from the AUTHORCOPY environment variable.
+(defvar gnus-asynchronous-article-function nil
+  "*Function for picking articles to pre-fetch, possibly.")
 
 
-Articles are saved using a function specified by the the variable
-`gnus-author-copy-saver' (`rmail-output' is default) if a file name is
-given.  Instead, if the first character of the name is `|', the
-contents of the article is piped out to the named program. It is
-possible to save an article in an MH folder as follows:
+(defvar gnus-score-file-suffix "SCORE"
+  "*Suffix of the score files.")
 
 
-\(setq gnus-author-copy \"|/usr/local/lib/mh/rcvstore +Article\")")
+(defvar gnus-score-interactive-default-score 1000
+  "*Scoring commands will raise/lower the score with this number as the default.")
 
 
-(defvar gnus-author-copy-saver (function rmail-output)
-  "A function called with a file name to save an author copy to.
-The default function is `rmail-output' which saves in Unix mailbox format.")
+(defvar gnus-large-newsgroup 200
+  "*The number of articles which indicates a large newsgroup.
+If the number of articles in a newsgroup is greater than this value,
+confirmation is required for selecting the newsgroup.")
+
+;; Suggested by Andrew Eskilsson <pi92ae@lelle.pt.hk-r.se>.
+(defvar gnus-no-groups-message "No news is horrible news"
+  "*Message displayed by Gnus when no groups are available.")
 
 (defvar gnus-use-long-file-name (not (memq system-type '(usg-unix-v xenix)))
 
 (defvar gnus-use-long-file-name (not (memq system-type '(usg-unix-v xenix)))
-  "Non-nil means that the default name of a file to save articles in is the newsgroup name.
-If it's nil, the directory form of the newsgroup name is used instead.")
+  "*Non-nil means that the default name of a file to save articles in is the group name.
+If it's nil, the directory form of the group name is used instead.
 
 
-(defvar gnus-article-save-directory (getenv "SAVEDIR")
-  "Name of the directory articles will be saved in (default \"~/News\").
-Initialized from the SAVEDIR environment variable.")
+If this variable is a list, and the list contains the element
+`not-score', long file names will not be used for score files; if it
+contains the element `not-save', long file names will not be used for
+saving; and if it contains the element `not-kill', long file names
+will not be used for kill files.")
 
 
-(defvar gnus-kill-files-directory (getenv "SAVEDIR")
-  "Name of the directory where kill files will be stored (default \"~/News\").
+(defvar gnus-article-save-directory (or (getenv "SAVEDIR") "~/News/")
+  "*Name of the directory articles will be saved in (default \"~/News\").
 Initialized from the SAVEDIR environment variable.")
 
 Initialized from the SAVEDIR environment variable.")
 
-(defvar gnus-kill-expiry-days 7
-  "*Number of days before unused kill file entries are expired.")
+(defvar gnus-kill-files-directory (or (getenv "SAVEDIR") "~/News/")
+  "*Name of the directory where kill files will be stored (default \"~/News\").
+Initialized from the SAVEDIR environment variable.")
 
 
-(defvar gnus-default-article-saver (function gnus-summary-save-in-rmail)
-  "A function to save articles in your favorite format.
+(defvar gnus-default-article-saver 'gnus-summary-save-in-rmail
+  "*A function to save articles in your favorite format.
 The function must be interactively callable (in other words, it must
 be an Emacs command).
 
 The function must be interactively callable (in other words, it must
 be an Emacs command).
 
@@ -208,32 +239,65 @@ Gnus provides the following functions:
 * gnus-summary-save-in-rmail (Rmail format)
 * gnus-summary-save-in-mail (Unix mail format)
 * gnus-summary-save-in-folder (MH folder)
 * gnus-summary-save-in-rmail (Rmail format)
 * gnus-summary-save-in-mail (Unix mail format)
 * gnus-summary-save-in-folder (MH folder)
-* gnus-summary-save-in-file (article format).")
+* gnus-summary-save-in-file (article format).
+* gnus-summary-save-in-vm (use VM's folder format).")
 
 (defvar gnus-rmail-save-name (function gnus-plain-save-name)
 
 (defvar gnus-rmail-save-name (function gnus-plain-save-name)
-  "A function generating a file name to save articles in Rmail format.
+  "*A function generating a file name to save articles in Rmail format.
 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE.")
 
 (defvar gnus-mail-save-name (function gnus-plain-save-name)
 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE.")
 
 (defvar gnus-mail-save-name (function gnus-plain-save-name)
-  "A function generating a file name to save articles in Unix mail format.
+  "*A function generating a file name to save articles in Unix mail format.
 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE.")
 
 (defvar gnus-folder-save-name (function gnus-folder-save-name)
 The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE.")
 
 (defvar gnus-folder-save-name (function gnus-folder-save-name)
-  "A function generating a file name to save articles in MH folder.
+  "*A function generating a file name to save articles in MH folder.
 The function is called with NEWSGROUP, HEADERS, and optional LAST-FOLDER.")
 
 (defvar gnus-file-save-name (function gnus-numeric-save-name)
 The function is called with NEWSGROUP, HEADERS, and optional LAST-FOLDER.")
 
 (defvar gnus-file-save-name (function gnus-numeric-save-name)
-  "A function generating a file name to save articles in article format.
-The function is called with NEWSGROUP, HEADERS, and optional LAST-FILE.")
+  "*A function generating a file name to save articles in article format.
+The function is called with NEWSGROUP, HEADERS, and optional
+LAST-FILE.")
 
 
-(defvar gnus-kill-file-name "KILL"
-  "Suffix of the kill files.")
+(defvar gnus-split-methods nil
+  "*Variable used to suggest where articles are to be saved.
+The syntax of this variable is the same as `nnmail-split-methods'.  
+
+For instance, if you would like to save articles related to Gnus in
+the file \"gnus-stuff\", and articles related to VM in \"vm-stuff\",
+you could set this variable to something like:
+
+ '((\"^Subject:.*gnus\\|^Newsgroups:.*gnus\" \"gnus-stuff\")
+   (\"^Subject:.*vm\\|^Xref:.*vm\" \"vm-stuff\"))")
+
+(defvar gnus-save-score nil
+  "*If non-nil, save group scoring info.")
+
+(defvar gnus-use-adaptive-scoring nil
+  "*If non-nil, use some adaptive scoring scheme.")
+
+(defvar gnus-use-cache nil
+  "*If non-nil, Gnus will cache (some) articles locally.")
+
+(defvar gnus-use-scoring t
+  "*If non-nil, enable scoring.")
+
+(defvar gnus-fetch-old-headers nil
+  "*Non-nil means that Gnus will try to build threads by grabbing old headers.
+If an unread article in the group refers to an older, already read (or
+just marked as read) article, the old article will not normally be
+displayed in the Summary buffer.  If this variable is non-nil, Gnus
+will attempt to grab the headers to the old articles, and thereby
+build complete threads.  If it has the value `some', only enough
+headers to connect otherwise loose threads will be displayed.
+
+The server has to support XOVER for any of this to work.")
 
 (defvar gnus-visual t
   "*If non-nil, will do various highlighting.
 
 (defvar gnus-visual t
   "*If non-nil, will do various highlighting.
-If nil, no mouse highlight (or any other) will be performed. This
-might speed up Gnus some when generating large Newsgroup and Summary
-buffers.")
+If nil, no mouse highlights (or any other highlights) will be
+performed.  This might speed up Gnus some when generating large group
+and summary buffers.")
 
 (defvar gnus-novice-user t
   "*Non-nil means that you are a usenet novice.
 
 (defvar gnus-novice-user t
   "*Non-nil means that you are a usenet novice.
@@ -244,282 +308,378 @@ required.")
   "*Non-nil means that you will never be asked for confirmation about anything.
 And that means *anything*.")
 
   "*Non-nil means that you will never be asked for confirmation about anything.
 And that means *anything*.")
 
+(defvar gnus-verbose 7
+  "*Integer that says how verbose Gnus should be.
+The higher the number, the more messages Gnus will flash to say what
+it's doing.  At zero, Gnus will be totally mute; at five, Gnus will
+display most important messages; and at ten, Gnus will keep on
+jabbering all the time.")
+
 (defvar gnus-keep-same-level nil
 (defvar gnus-keep-same-level nil
-  "Non-nil means that the next newsgroup after the current will be on the same level.
+  "*Non-nil means that the next newsgroup after the current will be on the same level.
 When you type, for instance, `n' after reading the last article in the
 current newsgroup, you will go to the next newsgroup. If this variable
 When you type, for instance, `n' after reading the last article in the
 current newsgroup, you will go to the next newsgroup. If this variable
-is nil, the next newsgroup will be the next from the Newsgroup
-buffer. If this variable is non-nil, Gnus will either put you in the
+is nil, the next newsgroup will be the next from the group
+buffer. 
+If this variable is non-nil, Gnus will either put you in the
 next newsgroup with the same level, or, if no such newsgroup is
 available, the next newsgroup with the lowest possible level higher
 next newsgroup with the same level, or, if no such newsgroup is
 available, the next newsgroup with the lowest possible level higher
-than the current level.")
+than the current level.
+If this variable is `best', Gnus will make the next newsgroup the one
+with the best level.")
 
 
-(defvar gnus-gather-loose-threads t
-  "Non-nil means sub-threads from a common thread will be gathered.
+(defvar gnus-summary-make-false-root 'adopt
+  "*nil means that Gnus won't gather loose threads.
 If the root of a thread has expired or been read in a previous
 session, the information necessary to build a complete thread has been
 lost. Instead of having many small sub-threads from this original thread
 If the root of a thread has expired or been read in a previous
 session, the information necessary to build a complete thread has been
 lost. Instead of having many small sub-threads from this original thread
-scattered all over the Summary buffer, Gnus will gather them. If the
-`gnus-summary-make-false-root' variable is non-nil, Gnus will also
-present them as one thread with a new root.")
+scattered all over the summary buffer, Gnus can gather them. 
 
 
-(defvar gnus-summary-make-false-root 'adopt
-  "nil means that Gnus won't print dummy roots of threads in the summary buffer.
-If `gnus-gather-loose-threads' is non-nil, Gnus will try to gather all
-loose sub-threads from an original thread into one large thread. If
-this variable is nil, these sub-threads will not get a common root,
-but will just be presented after one another. If this variable is
-`dummy', Gnus will create a dummy root that will have all the
-sub-threads as children.
+If non-nil, Gnus will try to gather all loose sub-threads from an
+original thread into one large thread.
+
+If this variable is non-nil, it should be one of `none', `adopt',
+`dummy' or `empty'.
+
+If this variable is `none', Gnus will not make a false root, but just
+present the sub-threads after another.
+If this variable is `dummy', Gnus will create a dummy root that will
+have all the sub-threads as children.
 If this variable is `adopt', Gnus will make one of the \"children\"
 the parent and mark all the step-children as such.
 If this variable is `empty', the \"children\" are printed with empty
 If this variable is `adopt', Gnus will make one of the \"children\"
 the parent and mark all the step-children as such.
 If this variable is `empty', the \"children\" are printed with empty
-subject fields.")
+subject fields.  (Or rather, they will be printed with a string
+given by the `gnus-summary-same-subject' variable.)")
+
+(defvar gnus-summary-gather-subject-limit nil
+  "*Maximum length of subject comparisons when gathering loose threads.
+Use nil to compare full subjects.  Setting this variable to a low
+number will help gather threads that have been corrupted by
+newsreaders chopping off subject lines, but it might also mean that
+unrelated articles that have subject that happen to begin with the
+same few characters will be incorrectly gathered.
+
+If this variable is `fuzzy', Gnus will use a fuzzy algortihm when
+comparing subjects.")
+
+;; Added by Per Abrahamsen <amanda@iesd.auc.dk>.
+(defvar gnus-summary-same-subject ""
+  "*String indicating that the current article has the same subject as the previous.
+This variable will only be used if the value of
+`gnus-summary-make-false-root' is `empty'.")
+
+(defvar gnus-summary-goto-unread nil
+  "*If non-nil, marking commands will go to the next unread article.")
+
+(defvar gnus-group-goto-unread t
+  "*If non-nil, movement commands will go to the next unread and subscribed group.")
 
 (defvar gnus-check-new-newsgroups t
 
 (defvar gnus-check-new-newsgroups t
-  "Non-nil means that Gnus will add new newsgroups at startup.
+  "*Non-nil means that Gnus will add new newsgroups at startup.
+If this variable is `ask-server', Gnus will ask the server for new
+groups since the last time it checked. This means that the killed list
+is no longer necessary, so you could set `gnus-save-killed-list' to
+nil. 
+
+A variant is to have this variable be a list of select methods. Gnus
+will then use the `ask-server' method on all these select methods to
+query for new groups from all those servers.
+
+Eg.
+  (setq gnus-check-new-newsgroups 
+        '((nntp \"some.server\") (nntp \"other.server\")))
+
 If this variable is nil, then you have to tell Gnus explicitly to
 check for new newsgroups with \\<gnus-group-mode-map>\\[gnus-find-new-newsgroups].")
 
 (defvar gnus-check-bogus-newsgroups nil
 If this variable is nil, then you have to tell Gnus explicitly to
 check for new newsgroups with \\<gnus-group-mode-map>\\[gnus-find-new-newsgroups].")
 
 (defvar gnus-check-bogus-newsgroups nil
-  "Non-nil means that Gnus will check and delete bogus newsgroup at startup.
+  "*Non-nil means that Gnus will check and remove bogus newsgroup at startup.
 If this variable is nil, then you have to tell Gnus explicitly to
 check for bogus newsgroups with \\<gnus-group-mode-map>\\[gnus-group-check-bogus-groups].")
 
 (defvar gnus-read-active-file t
 If this variable is nil, then you have to tell Gnus explicitly to
 check for bogus newsgroups with \\<gnus-group-mode-map>\\[gnus-group-check-bogus-groups].")
 
 (defvar gnus-read-active-file t
-  "Non-nil means that Gnus will read the entire active file at startup.
-If this variable is nil, Gnus will only read parts of the active file.")
+  "*Non-nil means that Gnus will read the entire active file at startup.
+If this variable is nil, Gnus will only know about the groups in your
+`.newsrc' file.
+
+If this variable is `some', Gnus will try to only read the relevant
+parts of the active file from the server.  Not all servers support
+this, and it might be quite slow with other servers, but this should
+generally be faster than both the t and nil value.
+
+If you set this variable to nil or `some', you probably still want to
+be told about new newsgroups that arrive.  To do that, set
+`gnus-check-new-newsgroups' to `ask-server'.  This may not work
+properly with all servers.")
+
+(defvar gnus-level-subscribed 5
+  "*Groups with levels less than or equal to this variable are subscribed.")
+
+(defvar gnus-level-unsubscribed 7
+  "*Groups with levels less than or equal to this variable are unsubscribed.
+Groups with levels less than `gnus-level-subscribed', which should be
+less than this variable, are subscribed.")
+
+(defvar gnus-level-zombie 8
+  "*Groups with this level are zombie groups.")
+
+(defvar gnus-level-killed 9
+  "*Groups with this level are killed.")
+
+(defvar gnus-level-default-subscribed 3
+  "*New subscribed groups will be subscribed at this level.")
+
+(defvar gnus-level-default-unsubscribed 6
+  "*New unsubscribed groups will be unsubscribed at this level.")
 
 (defvar gnus-activate-foreign-newsgroups nil
 
 (defvar gnus-activate-foreign-newsgroups nil
-  "If nil, Gnus will not check foreign newsgroups at startup.
+  "*If nil, Gnus will not check foreign newsgroups at startup.
 If it is non-nil, it should be a number between one and nine. Foreign
 newsgroups that have a level lower or equal to this number will be
 activated on startup. For instance, if you want to active all
 If it is non-nil, it should be a number between one and nine. Foreign
 newsgroups that have a level lower or equal to this number will be
 activated on startup. For instance, if you want to active all
-subscribed newsgroups, but not the rest, you'd set this variable to 5.
+subscribed newsgroups, but not the rest, you'd set this variable to 
+`gnus-level-subscribed'.
 
 If you subscribe to lots of newsgroups from different servers, startup
 might take a while. By setting this variable to nil, you'll save time,
 but you won't be told how many unread articles there are in the
 
 If you subscribe to lots of newsgroups from different servers, startup
 might take a while. By setting this variable to nil, you'll save time,
 but you won't be told how many unread articles there are in the
-newsgroups.")
+groups.")
 
 (defvar gnus-save-newsrc-file t
 
 (defvar gnus-save-newsrc-file t
-  "Non-nil means that Gnus will save a .newsrc file.
-Gnus always saves its own startup file, which is called \".newsrc.el\".
-The file called \".newsrc\" is in a format that can be readily
-understood by other newsreaders. If you don't plan on using other
-newsreaders, set this variable to nil to save some time on exit.")
+  "*Non-nil means that Gnus will save the `.newsrc' file.
+Gnus always saves its own startup file, which is called
+\".newsrc.eld\".  The file called \".newsrc\" is in a format that can
+be readily understood by other newsreaders.  If you don't plan on
+using other newsreaders, set this variable to nil to save some time on
+exit.")
 
 (defvar gnus-save-killed-list t
 
 (defvar gnus-save-killed-list t
-  "If non-nil, save the list of killed groups to the startup file.
-This will save both time (when starting and quitting) and space (on
-disk), but it will also mean that Gnus has no record of what
-newsgroups are new or old, so the automatic new newsgroups
-subscription methods become meaningless. You should always set
-`gnus-check-new-newsgroups' to nil if you set this variable to nil.") 
+  "*If non-nil, save the list of killed groups to the startup file.
+This will save both time (when starting and quitting) and space (both
+memory and disk), but it will also mean that Gnus has no record of
+which groups are new and which are old, so the automatic new
+newsgroups subscription methods become meaningless. You should always
+set `gnus-check-new-newsgroups' to `ask-server' or nil if you set this
+variable to nil.")
 
 (defvar gnus-interactive-catchup t
 
 (defvar gnus-interactive-catchup t
-  "Require your confirmation when catching up a newsgroup if non-nil.")
+  "*If non-nil, require your confirmation when catching up a group.")
 
 (defvar gnus-interactive-post t
 
 (defvar gnus-interactive-post t
-  "Newsgroup and subject will be asked for if non-nil.")
+  "*If non-nil, group name will be asked for when posting.")
 
 (defvar gnus-interactive-exit t
 
 (defvar gnus-interactive-exit t
-  "Require your confirmation when exiting Gnus if non-nil.")
+  "*If non-nil, require your confirmation when exiting Gnus.")
 
 
-(defvar gnus-kill-killed t
-  "If non-nil, Gnus will apply kill files to already \"killed\" articles.
+(defvar gnus-kill-killed nil
+  "*If non-nil, Gnus will apply kill files to already killed articles.
 If it is nil, Gnus will never apply kill files to articles that have
 If it is nil, Gnus will never apply kill files to articles that have
-already been through the kill process, which might very well save lots
+already been through the scoring process, which might very well save lots
 of time.")
 
 of time.")
 
-;; Added by Per Abrahamsen <amanda@iesd.auc.dk>.
-(defvar gnus-summary-same-subject ""
-  "String indicating that the current article has the same subject as the previous.")
+(defvar gnus-extract-address-components 'gnus-extract-address-components
+  "*Function for extracting address components from a From header.
+Two pre-defined function exist: `gnus-extract-address-components',
+which is the default, quite fast, and too simplistic solution, and
+`mail-extract-address-components', which works much better, but is
+slower.")
 
 
-(defvar gnus-summary-default-interest nil
-  "Default article interest level.
-If this variable is nil, interest levels will not be used.")
+(defvar gnus-summary-default-score 0
+  "*Default article score level.
+If this variable is nil, scoring will be disabled.")
 
 
-(defvar gnus-user-login-name nil
-  "The login name of the user.
-Got from the function `user-login-name' if undefined.")
+(defvar gnus-group-default-list-level gnus-level-subscribed
+  "*Default listing level.")
 
 
-(defvar gnus-user-full-name nil
-  "The full name of the user.
-Got from the NAME environment variable if undefined.")
+(defvar gnus-group-always-list-unread gnus-level-subscribed
+  "*Always list groups less than this variable with unread articles. 
+If nil, use parameter to specify.")
 
 (defvar gnus-show-mime nil
 
 (defvar gnus-show-mime nil
-  "*Show MIME message if non-nil.")
+  "*If non-ni, do mime processing of articles.
+The articles will simply be fed to the function given by
+`gnus-show-mime-method'.")
+
+(defvar gnus-show-mime-method (function metamail-buffer)
+  "*Function to process a MIME message.
+The function is called from the article buffer.")
 
 (defvar gnus-show-threads t
 
 (defvar gnus-show-threads t
-  "*Show conversation threads in Summary Mode if non-nil.")
+  "*If non-nil, display threads in summary mode.")
 
 (defvar gnus-thread-hide-subtree nil
 
 (defvar gnus-thread-hide-subtree nil
-  "Non-nil means hide thread subtrees initially.
-If non-nil, you have to run the command `gnus-summary-show-thread' by
-hand or by using `gnus-select-article-hook' to show hidden threads.")
+  "*If non-nil, hide all threads initially.
+If threads are hidden, you have to run the command
+`gnus-summary-show-thread' by hand or use `gnus-select-article-hook'
+to expose hidden threads.")
 
 (defvar gnus-thread-hide-killed t
 
 (defvar gnus-thread-hide-killed t
-  "Non-nil means hide killed thread subtrees automatically.")
+  "*If non-nil, hide killed threads automatically.")
 
 (defvar gnus-thread-ignore-subject nil
 
 (defvar gnus-thread-ignore-subject nil
-  "Don't take care of subject differences, but only references if non-nil.
-If it is non-nil, some commands work with subjects do not work properly.")
+  "*If non-nil, ignore subjects and do all threading based on the Reference header.
+If nil, which is the default, articles that have different subjects
+from their parents will start separate threads.")
 
 (defvar gnus-thread-indent-level 4
 
 (defvar gnus-thread-indent-level 4
-  "Indentation of thread subtrees.")
-
-;; jwz: nuke newsgroups whose name is all digits - that means that
-;; some loser has let articles get into the root of the news spool,
-;; which is toxic. Lines beginning with whitespace also tend to be
-;; toxic.
-(defvar gnus-ignored-newsgroups
-  (purecopy (mapconcat 'identity
-                      '("^to\\."               ; not "real" groups
-                        "^[0-9. \t]+ "         ; all digits in name
-                        "[][\"#'();\\]"        ; bogus characters
-                        )
-                      "\\|"))
-  "A regexp to match uninteresting newsgroups in the active file.
+  "*Number that says how much each sub-thread should be indented.")
+
+(defvar gnus-ignored-newsgroups ""
+  "*A regexp to match uninteresting newsgroups in the active file.
 Any lines in the active file matching this regular expression are
 removed from the newsgroup list before anything else is done to it,
 thus making them effectively non-existant.")
 
 (defvar gnus-ignored-headers
   "^Path:\\|^Posting-Version:\\|^Article-I.D.:\\|^Expires:\\|^Date-Received:\\|^References:\\|^Control:\\|^Xref:\\|^Lines:\\|^Posted:\\|^Relay-Version:\\|^Message-ID:\\|^Nf-ID:\\|^Nf-From:\\|^Approved:\\|^Sender:\\|^Received:\\|^Mail-from:"
 Any lines in the active file matching this regular expression are
 removed from the newsgroup list before anything else is done to it,
 thus making them effectively non-existant.")
 
 (defvar gnus-ignored-headers
   "^Path:\\|^Posting-Version:\\|^Article-I.D.:\\|^Expires:\\|^Date-Received:\\|^References:\\|^Control:\\|^Xref:\\|^Lines:\\|^Posted:\\|^Relay-Version:\\|^Message-ID:\\|^Nf-ID:\\|^Nf-From:\\|^Approved:\\|^Sender:\\|^Received:\\|^Mail-from:"
-  "All header lines that match this regexp will be hidden.
+  "*All headers that match this regexp will be hidden.
 Also see `gnus-visible-headers'.")
 
 Also see `gnus-visible-headers'.")
 
-(defvar gnus-visible-headers "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^Followup-To:\\|^Reply-To:\\|^Organization:\\|^Summary:\\|^Keywords:"
-  "All header lines that do not match this regexp will be hidden.
+(defvar gnus-visible-headers "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^Followup-To:\\|^Reply-To:\\|^Organization:\\|^Summary:\\|^Keywords:\\|^To:\\|^Cc:"
+  "*All headers that do not match this regexp will be hidden.
 Also see `gnus-ignored-headers'.")
 
 (defvar gnus-sorted-header-list
 Also see `gnus-ignored-headers'.")
 
 (defvar gnus-sorted-header-list
-  '("^From:" "^Subject:" "^Summary:" "^Keywords:" "^Newsgroups:" 
-    "^Date:" "^Organization:")
-  "This variable is a list of regular expressions.
-If it is non-nil, header lines that match the regular expressions will
-be placed first in the Article buffer in the sequence specified by
+  '("^From:" "^Subject:" "^Summary:" "^Keywords:" "^Newsgroups:" "^To:" 
+    "^Cc:" "^Date:" "^Organization:")
+  "*This variable is a list of regular expressions.
+If it is non-nil, headers that match the regular expressions will
+be placed first in the article buffer in the sequence specified by
 this list.")
 
 this list.")
 
-(defvar gnus-required-headers
-  '(From Date Newsgroups Subject Message-ID Organization Lines X-Newsreader)
-  ;; changed by jwz because it's not so nice to do "Lines: 0" by default.
-  ;; and to remove Path, since it's incorrect for Gnus to try
-  ;; and generate that - it is the responsibility of inews or nntpd.
-  "All required fields for articles you post.
-RFC977 and RFC1036 require From, Date, Newsgroups, Subject, Message-ID
-and Path fields.  Organization, Lines and X-Newsreader are optional.
-If you want Gnus not to insert some field, remove it from this
-variable.")
-
 (defvar gnus-show-all-headers nil
 (defvar gnus-show-all-headers nil
-  "*Show all headers of an article if non-nil.")
+  "*If non-nil, don't hide any headers.")
 
 (defvar gnus-save-all-headers t
 
 (defvar gnus-save-all-headers t
-  "*Save all headers of an article if non-nil.")
+  "*If non-nil, don't remove any headers before saving.")
 
 (defvar gnus-inhibit-startup-message nil
 
 (defvar gnus-inhibit-startup-message nil
-  "The startup message will not be displayed if this function is non-nil.")
+  "*If non-nil, the startup message will not be displayed.")
 
 (defvar gnus-auto-extend-newsgroup t
 
 (defvar gnus-auto-extend-newsgroup t
-  "Extend visible articles to forward and backward if non-nil.")
+  "*If non-nil, extend newsgroup forward and backward when requested.")
 
 (defvar gnus-auto-select-first t
 
 (defvar gnus-auto-select-first t
-  "Select the first unread article automagically if non-nil.
+  "*If non-nil, select the first unread article when entering a group.
 If you want to prevent automatic selection of the first unread article
 If you want to prevent automatic selection of the first unread article
-in some newsgroups, set the variable to nil in `gnus-select-group-hook'
-or `gnus-apply-kill-hook'.")
+in some newsgroups, set the variable to nil in
+`gnus-select-group-hook'.") 
 
 (defvar gnus-auto-select-next t
 
 (defvar gnus-auto-select-next t
-  "Select the next newsgroup automagically if non-nil.
+  "*If non-nil, offer to go to the next group from the end of the previous.
 If the value is t and the next newsgroup is empty, Gnus will exit
 If the value is t and the next newsgroup is empty, Gnus will exit
-Summary mode and go back to Group mode.  If the value is neither nil
-nor t, Gnus will select the following unread newsgroup.  Especially, if
-the value is the symbol `quietly', the next unread newsgroup will be
-selected without any confirmations.")
+summary mode and go back to group mode.  If the value is neither nil
+nor t, Gnus will select the following unread newsgroup.  In
+particular, if the value is the symbol `quietly', the next unread
+newsgroup will be selected without any confirmations.")
 
 (defvar gnus-auto-select-same nil
 
 (defvar gnus-auto-select-same nil
-  "Select the next article with the same subject automagically if non-nil.")
+  "*If non-nil, select the next article with the same subject.")
 
 
-(defvar gnus-auto-center-summary t
-  "*Always center the current summary in Gnus Summary window if non-nil.")
+(defvar gnus-summary-check-current nil
+  "*If non-nil, consider the current article when moving.
+The \"unread\" movement commands will stay on the same line if the
+current article is unread.")
 
 
-(defvar gnus-auto-mail-to-author nil
-  "Insert `To: author' of the article when following up if non-nil.
-Mail is sent using the function specified by the variable
-`gnus-mail-send-method'.")
+(defvar gnus-auto-center-summary t
+  "*If non-nil, always center the current summary buffer.")
 
 (defvar gnus-break-pages t
 
 (defvar gnus-break-pages t
-  "*Break an article into pages if non-nil.
-Page delimiter is specified by the variable `gnus-page-delimiter'.")
+  "*If non-nil, do page breaking on articles.
+The page delimiter is specified by the `gnus-page-delimiter'
+variable.")
 
 (defvar gnus-page-delimiter "^\^L"
 
 (defvar gnus-page-delimiter "^\^L"
-  "Regexp describing line-beginnings that separate pages of news article.")
-
-(defvar gnus-digest-show-summary t
-  "Show a summary of undigestified messages if non-nil.")
-
-(defvar gnus-digest-separator "^Subject:[ \t]"
-  "Regexp that separates messages in a digest article.")
+  "*Regexp describing what to use as article page delimiters.
+The default value is \"^\^L\", which is a form linefeed at the
+beginning of a line.")
 
 (defvar gnus-use-full-window t
 
 (defvar gnus-use-full-window t
-  "*Non-nil means to take up the entire screen of Emacs.")
-
-(defvar gnus-window-configuration
-  '((summary (0 1 0))
-    (newsgroups (1 0 0))
-    (article (0 3 10)))
-  "Specify window configurations for each action.
-The format of the variable is either a list of (ACTION (G S A)), where
-G, S, and A are the relative height of Group, Summary, and Article
-windows, respectively, or a list of (ACTION FUNCTION), where FUNCTION
-is a function that will be called with ACTION as an argument. ACTION
-can be `summary', `newsgroups', or `article'.")
-
-(defvar gnus-show-mime-method (function metamail-buffer)
-  "Function to process a MIME message.
-The function is expected to process current buffer as a MIME message.")
-
-(defvar gnus-mail-reply-method
-  (function gnus-mail-reply-using-mail)
-  "Function to compose reply mail.
-The function `gnus-mail-reply-using-mail' uses usual sendmail mail
-program.  The function `gnus-mail-reply-using-mhe' uses the MH-E mail
-program.  You can use yet another program by customizing this variable.")
-
-(defvar gnus-mail-forward-method
-  (function gnus-mail-forward-using-mail)
-  "Function to forward current message to another user.
-The function `gnus-mail-reply-using-mail' uses usual sendmail mail
-program.  You can use yet another program by customizing this variable.")
-
-(defvar gnus-mail-other-window-method
-  (function gnus-mail-other-window-using-mail)
-  "Function to compose mail in other window.
-The function `gnus-mail-other-window-using-mail' uses the usual sendmail
-mail program.  The function `gnus-mail-other-window-using-mhe' uses the MH-E
-mail program.  You can use yet another program by customizing this variable.")
-
-(defvar gnus-mail-send-method send-mail-function
-  "Function to mail a message too which is being posted as an article.
-The message must have To: or Cc: field.  The default is copied from
-the variable `send-mail-function'.")
-
-(defvar gnus-subscribe-newsgroup-method
-  (function gnus-subscribe-zombies)
-  "Function called with a newsgroup name when new newsgroup is found.
-The function `gnus-subscribe-randomly' inserts a new newsgroup a the
-beginning of newsgroups.  The function `gnus-subscribe-alphabetically'
-inserts it in strict alphabetic order.  The function
-`gnus-subscribe-hierarchically' inserts it in hierarchical newsgroup
-order.  The function `gnus-subscribe-interactively' asks for your decision.")
-
-;; Suggested by a bug report by Hallvard B Furuseth
+  "*If non-nil, use the entire Emacs screen.")
+
+(defvar gnus-window-configuration nil
+  "Obsolete variable.  See `gnus-buffer-configuration'.")
+
+(defvar gnus-buffer-configuration
+  '((group ([group 1.0 point] 
+           (if gnus-carpal [group-carpal 4])))
+    (summary ([summary 1.0 point]
+             (if gnus-carpal [summary-carpal 4])))
+    (article ([summary 0.25 point] 
+             (if gnus-carpal [summary-carpal 4]) 
+             [article 1.0]))
+    (server ([server 1.0 point]
+            (if gnus-carpal [server-carpal 2])))
+    (browse ([browse 1.0 point]
+            (if gnus-carpal [browse-carpal 2])))
+    (group-mail ([mail 1.0 point]))
+    (summary-mail ([mail 1.0 point]))
+    (summary-reply ([article 0.5]
+                   [mail 1.0 point]))
+    (info ([nil 1.0 point]))
+    (summary-faq ([summary 0.25]
+                 [article 1.0 point]))
+    (edit-group ([group 0.5]
+                [edit-group 1.0 point]))
+    (edit-server ([server 0.5]
+                 [edit-server 1.0 point]))
+    (post ([post 1.0 point]))
+    (reply ([article 0.5]
+           [mail 1.0 point]))
+    (mail-forward ([mail 1.0 point]))
+    (post-forward ([post 1.0 point]))
+    (reply-yank ([mail 1.0 point]))
+    (followup ([article 0.5]
+              [post 1.0 point]))
+    (followup-yank ([post 1.0 point])))
+  "Window configuration for all possible Gnus buffers.
+This variable is a list of lists.  Each of these lists has a NAME and
+a RULE.  The NAMEs are commonsense names like `group', which names a
+rule used when displaying the group buffer; `summary', which names a
+rule for what happens when you enter a group and do not display an
+article buffer; and so on.  See the value of this variable for a
+complete list of NAMEs.
+
+Each RULE is a list of vectors.  The first element in this vector is
+the name of the buffer to be displayed; the second element is the
+percentage of the screen this buffer is to occupy (a number in the
+0.0-0.99 range); the optional third element is `point', which should
+be present to denote which buffer point is to go to after making this
+buffer configuration.")
+
+(defvar gnus-window-to-buffer
+  '((group . gnus-group-buffer)
+    (summary . gnus-summary-buffer)
+    (article . gnus-article-buffer)
+    (server . gnus-server-buffer)
+    (browse . "*Gnus Browse Server*")
+    (edit-group . gnus-group-edit-buffer)
+    (edit-server . gnus-server-edit-buffer)
+    (group-carpal . gnus-carpal-group-buffer)
+    (summary-carpal . gnus-carpal-summary-buffer)
+    (server-carpal . gnus-carpal-server-buffer)
+    (browse-carpal . gnus-carpal-browse-buffer)
+    (mail . "*mail*")
+    (post . gnus-post-news-buffer))
+  "Mapping from short symbols to buffer names or buffer variables.")
+
+(defvar gnus-carpal nil
+  "*If non-nil, display clickable icons.")
+
+(defvar gnus-subscribe-newsgroup-method 'gnus-subscribe-zombies
+  "*Function called with a group name when new group is detected.
+A few pre-made functions are supplied: `gnus-subscribe-randomly'
+inserts new groups at the beginning of the list of groups;
+`gnus-subscribe-alphabetically' inserts new groups in strict
+alphabetic order; `gnus-subscribe-hierarchically' inserts new groups
+in hierarchical newsgroup order; `gnus-subscribe-interactively' asks
+for your decision.")
+
+;; Suggested by a bug report by Hallvard B Furuseth.
 ;; <h.b.furuseth@usit.uio.no>. 
 (defvar gnus-subscribe-options-newsgroup-method
   (function gnus-subscribe-alphabetically)
 ;; <h.b.furuseth@usit.uio.no>. 
 (defvar gnus-subscribe-options-newsgroup-method
   (function gnus-subscribe-alphabetically)
-  "This function is called to subscribe newsgroups mentioned on \"options -n\" lines.
+  "*This function is called to subscribe newsgroups mentioned on \"options -n\" lines.
 If, for instance, you want to subscribe to all newsgroups in the
 \"no\" and \"alt\" hierarchies, you'd put the following in your
 .newsrc file:
 If, for instance, you want to subscribe to all newsgroups in the
 \"no\" and \"alt\" hierarchies, you'd put the following in your
 .newsrc file:
@@ -529,208 +689,8 @@ options -n no.all alt.all
 Gnus will the subscribe all new newsgroups in these hierarchies with
 the subscription method in this variable.")
 
 Gnus will the subscribe all new newsgroups in these hierarchies with
 the subscription method in this variable.")
 
-;; Mark variables suggested by Thomas Michanek
-;; <Thomas.Michanek@telelogic.se>. 
-(defvar gnus-unread-mark " "
-  "Mark used for unread articles.")
-
-(defvar gnus-read-mark "D"
-  "Mark used for read articles.")
-
-(defvar gnus-ticked-mark "-"
-  "Mark used for ticked articles.")
-
-(defvar gnus-dormant-mark "+"
-  "Mark used for dormant articles.")
-
-(defvar gnus-killed-mark "K"
-  "Mark used for killed articles.")
-
-(defvar gnus-kill-file-mark "X"
-  "Mark used for articles killed by kill files.")
-
-(defvar gnus-catchup-mark "C"
-  "Mark used for articles that are caught up.")
-
-(defvar gnus-group-mode-hook nil
-  "A hook for Gnus Group Mode.")
-
-(defvar gnus-summary-mode-hook nil
-  "A hook for Gnus Summary Mode.")
-
-(defvar gnus-article-mode-hook nil
-  "A hook for Gnus Article Mode.")
-
-(defvar gnus-kill-file-mode-hook nil
-  "A hook for Gnus KILL File Mode.")
-
-(defvar gnus-open-server-hook nil
-  "A hook called just before opening connection to news server.")
-
-(defvar gnus-startup-hook nil
-  "A hook called at startup time.
-This hook is called after Gnus is connected to the NNTP server. So, it
-is possible to change the behavior of Gnus according to the selected
-NNTP server.")
-
-(defvar gnus-group-prepare-hook nil
-  "A hook called after the newsgroup list is created in the Newsgroup buffer.
-If you want to modify the Newsgroup buffer, you can use this hook.")
-
-(defvar gnus-summary-prepare-hook nil
-  "A hook called after summary list is created in the Summary buffer.
-If you want to modify the Summary buffer, you can use this hook.")
-
-(defvar gnus-article-prepare-hook nil
-  "A hook called after an article is prepared in the Article buffer.
-If you want to run a special decoding program like nkf, use this hook.")
-
-(defvar gnus-article-display-hook nil
-  "A hook called after the article is displayed in the Article buffer.
-The hook is designed to change the contents of the Article
-buffer. Typical functions that this hook may contain are
-`gnus-article-hide-headers' (hide selected headers),
-`gnus-article-hide-signature' (hide signature) and
-`gnus-article-treat-overstrike' (turn \"^H_\" into bold characters).")
-(add-hook 'gnus-article-display-hook 'gnus-article-hide-headers-if-wanted)
-
-(defvar gnus-select-group-hook nil
-  "A hook called when a newsgroup is selected.
-If you want to sort Summary buffer by date and then by subject, you
-can use the following hook:
-
- (setq gnus-select-group-hook
-      (list
-       (lambda ()
-         ;; First of all, sort by date.
-         (gnus-keysort-headers
-          (function string-lessp)
-           (lambda (a)
-             (gnus-sortable-date (header-date a))))
-         ;; Then sort by subject string ignoring `Re:'.
-         ;; If case-fold-search is non-nil, case of letters is ignored.
-         (gnus-keysort-headers
-          (function string-lessp)
-           (lambda (a)
-             (if case-fold-search
-                 (downcase (gnus-simplify-subject (header-subject a) t))
-               (gnus-simplify-subject (header-subject a) t)))))))
-
-If you'd like to simplify subjects like the
-`gnus-summary-next-same-subject' command does, you can use the
-following hook:
-
- (setq gnus-select-group-hook
-      (list
-       (lambda ()
-         (mapcar (lambda (header)
-                    (header-set-subject
-                     header
-                     (gnus-simplify-subject
-                      (header-subject header) 're-only)))
-                 gnus-newsgroup-headers))))
-")
-
-(defvar gnus-select-article-hook
-  '(gnus-summary-show-thread)
-  "A hook called when an article is selected.
-The default hook shows conversation thread subtrees of the selected
-article automatically using `gnus-summary-show-thread'.
-
-If you'd like to run RMAIL on a digest article automagically, you can
-use the following hook:
-
-\(setq gnus-select-article-hook
-      (list
-       (lambda ()
-         (gnus-summary-show-thread)
-         (cond ((string-equal \"comp.sys.sun\" gnus-newsgroup-name)
-                (gnus-summary-rmail-digest))
-               ((and (string-equal \"comp.text\" gnus-newsgroup-name)
-                     (string-match \"^TeXhax Digest\"
-                                   (header-subject gnus-current-headers)))
-                (gnus-summary-rmail-digest)
-                )))))")
-
-(defvar gnus-select-digest-hook
-  (list
-    (lambda ()
-      ;; Reply-To: is required by `undigestify-rmail-message'.
-      (or (mail-position-on-field "Reply-to" t)
-         (progn
-           (mail-position-on-field "Reply-to")
-           (insert (gnus-fetch-field "From"))))))
-  "A hook called when reading digest messages using Rmail.
-This hook can be used to modify incomplete digest articles as follows
-\(this is the default):
-
-\(setq gnus-select-digest-hook
-      (list
-       (lambda ()
-         ;; Reply-To: is required by `undigestify-rmail-message'.
-         (or (mail-position-on-field \"Reply-to\" t)
-             (progn
-               (mail-position-on-field \"Reply-to\")
-               (insert (gnus-fetch-field \"From\")))))))")
-
-(defvar gnus-rmail-digest-hook nil
-  "A hook called when reading digest messages using Rmail.
-This hook is intended to customize Rmail mode for reading digest articles.")
-
-(defvar gnus-apply-kill-hook '(gnus-apply-kill-file)
-  "A hook called when a newsgroup is selected and summary list is prepared.
-This hook is intended to apply a KILL file to the selected newsgroup.
-The function `gnus-apply-kill-file' is called by default.
-
-Since a general KILL file is too heavy to use only for a few
-newsgroups, I recommend you to use a lighter hook function. For
-example, if you'd like to apply a KILL file to articles which contains
-a string `rmgroup' in subject in newsgroup `control', you can use the
-following hook:
-
-\(setq gnus-apply-kill-hook
-      (list
-       (lambda ()
-         (cond ((string-match \"control\" gnus-newsgroup-name)
-                (gnus-kill \"Subject\" \"rmgroup\")
-                (gnus-expunge \"X\"))))))")
-
-(defvar gnus-visual-mark-article-hook 'gnus-visual-highlight-selected-summary
-  "Hook run after selecting an article in the Summary buffer.
-It is meant to be used for highlighting the article in some way. It is
-not run if `gnus-visual' is nil.")
-
-(defvar gnus-prepare-article-hook (list (function gnus-inews-insert-signature))
-  "A hook called after preparing body, but before preparing header fields.
-The default hook (`gnus-inews-insert-signature') inserts a signature
-file specified by the variable `gnus-signature-file'.")
-
-(defvar gnus-inews-article-hook (list (function gnus-inews-do-fcc))
-  "A hook called before finally posting an article.
-The default hook (`gnus-inews-do-fcc') does FCC processing (save article
-to a file).")
-
-(defvar gnus-exit-group-hook nil
-  "A hook called when exiting (not quitting) Summary mode.
-If your machine is so slow that exiting from Summary mode takes very
-long time, set the variable `gnus-use-cross-reference' to nil. This
-inhibits marking articles as read using cross-reference information.")
-
-(defvar gnus-suspend-gnus-hook nil
-  "A hook called when suspending (not exiting) Gnus.")
-
-(defvar gnus-exit-gnus-hook (list 'nntp-request-close)
-  "A hook called when exiting Gnus.")
-
-(defvar gnus-save-newsrc-hook nil
-  "A hook called when saving the newsrc file.
-This hook is called before saving the `.newsrc' file.")
-
-(defvar gnus-auto-expirable-newsgroups nil
-  "All newsgroups that match this regexp will have all read articles automatically marked as expirable.")
-
 (defvar gnus-subscribe-hierarchical-interactive nil
 (defvar gnus-subscribe-hierarchical-interactive nil
-  "If non-nil, Gnus will offer to subscribe hierarchically.
+  "*If non-nil, Gnus will offer to subscribe hierarchically.
 When a new hierarchy appears, Gnus will ask the user:
 
 'alt.binaries': Do you want to subscribe to this hierarchy? ([d]ys):
 When a new hierarchy appears, Gnus will ask the user:
 
 'alt.binaries': Do you want to subscribe to this hierarchy? ([d]ys):
@@ -739,14 +699,73 @@ If the user pressed `d', Gnus will descend the hierarchy, `y' will
 subscribe to all newsgroups in the hierarchy and `s' will skip this
 hierarchy in its entirety.")
 
 subscribe to all newsgroups in the hierarchy and `s' will skip this
 hierarchy in its entirety.")
 
-(defvar gnus-group-line-format "%M%S%5y: %G %z\n"
-  "Format of Newsgroups lines.
+(defvar gnus-group-sort-function 'gnus-group-sort-by-alphabet
+  "*Function used for sorting the group buffer.
+This function will be called with group info entries as the arguments
+for the groups to be sorted.  Pre-made functions include
+`gnus-sort-by-alphabet', `gnus-sort-by-unread' and
+`gnus-sort-by-level'")
+
+;; Mark variables suggested by Thomas Michanek
+;; <Thomas.Michanek@telelogic.se>. 
+(defvar gnus-unread-mark ? 
+  "*Mark used for unread articles.")
+(defvar gnus-ticked-mark ?!
+  "*Mark used for ticked articles.")
+(defvar gnus-dormant-mark ??
+  "*Mark used for dormant articles.")
+(defvar gnus-del-mark ?D
+  "*Mark used for del'd articles.")
+(defvar gnus-read-mark ?d
+  "*Mark used for read articles.")
+(defvar gnus-expirable-mark ?E
+  "*Mark used for expirable articles.")
+(defvar gnus-killed-mark ?K
+  "*Mark used for killed articles.")
+(defvar gnus-kill-file-mark ?X
+  "*Mark used for articles killed by kill files.")
+(defvar gnus-low-score-mark ?Y
+  "*Mark used for articles with a low score.")
+(defvar gnus-catchup-mark ?C
+  "*Mark used for articles that are caught up.")
+(defvar gnus-replied-mark ?R
+  "*Mark used for articles that have been replied to.")
+(defvar gnus-process-mark ?# 
+  "*Process mark.")
+(defvar gnus-ancient-mark ?A
+  "*Mark used for ancient articles.")
+(defvar gnus-canceled-mark ?G
+  "*Mark used for cancelled articles.")
+(defvar gnus-score-over-mark ?+
+  "*Score mark used for articles with high scores.")
+(defvar gnus-score-below-mark ?-
+  "*Score mark used for articles with low scores.")
+(defvar gnus-empty-thread-mark ? 
+  "*There is no thread under the article.")
+(defvar gnus-not-empty-thread-mark ?=
+  "*There is a thread under the article.")
+
+(defvar gnus-view-pseudo-asynchronously nil
+  "*If non-nil, Gnus will view pseudo-articles asynchronously.")
+
+(defvar gnus-view-pseudos nil
+  "*If `automatic', pseudo-articles will be viewed automatically.
+If `not-confirm', pseudos will be viewed automatically, and the user
+will not be asked to confirm the command.")
+
+(defvar gnus-view-pseudos-separately t
+  "*If non-nil, one pseudo-article will be created for each file to be viewed.
+If nil, all files that use the same viewing command will be given as a
+list of parameters to that command.")
+
+(defvar gnus-group-line-format "%M%S%5y: %(%g%)\n"
+  "*Format of group lines.
 It works along the same lines as a normal formatting string,
 It works along the same lines as a normal formatting string,
-with some simple extrensions.
+with some simple extensions.
 
 %M    Only marked articles (character, \"*\" or \" \")
 %S    Whether the group is subscribed (character, \"U\", \"K\", \"Z\" or \" \")
 
 %M    Only marked articles (character, \"*\" or \" \")
 %S    Whether the group is subscribed (character, \"U\", \"K\", \"Z\" or \" \")
-%L    Level of subscribedness (integer, 1-9)
+%L    Level of subscribedness (integer)
 %N    Number of unread articles (integer)
 %I    Number of dormant articles (integer)
 %i    Number of ticked and dormant (integer)
 %N    Number of unread articles (integer)
 %I    Number of dormant articles (integer)
 %i    Number of ticked and dormant (integer)
@@ -755,12 +774,22 @@ with some simple extrensions.
 %t    Total number of articles (integer)
 %y    Number of unread, unticked articles (integer)
 %G    Group name (string)
 %t    Total number of articles (integer)
 %y    Number of unread, unticked articles (integer)
 %G    Group name (string)
-%D    Newsgroup description (string)
+%g    Qualified group name (string)
+%D    Group description (string)
 %s    Select method (string)
 %o    Moderated group (char, \"m\")
 %O    Moderated group (string, \"(m)\" or \"\")
 %n    Select from where (string)
 %z    A string that look like `<%s:%n>' if a foreign select method is used
 %s    Select method (string)
 %o    Moderated group (char, \"m\")
 %O    Moderated group (string, \"(m)\" or \"\")
 %n    Select from where (string)
 %z    A string that look like `<%s:%n>' if a foreign select method is used
+%u    User defined specifier. The next character in the format string should
+      be a letter.  Gnus will call the function gnus-user-format-function-X,
+      where X is the letter following %u. The function will be passed the
+      current header as argument. The function should return a string, which
+      will be inserted into the buffer just like information from any other
+      group specifier.
+
+Text between %( and %) will be highlighted with `gnus-mouse-face' when
+the mouse point move inside the area.  There can only be one such area.
 
 Note that this format specification is not always respected. For
 reasons of efficiency, when listing killed groups, this specification
 
 Note that this format specification is not always respected. For
 reasons of efficiency, when listing killed groups, this specification
@@ -774,235 +803,442 @@ Also note that if you change the format specification to include any
 of these specs, you must probably re-start Gnus to see them go into
 effect.") 
 
 of these specs, you must probably re-start Gnus to see them go into
 effect.") 
 
-(defvar gnus-summary-line-format "%U%R%X%i %I%[%4L: %-20,20n%] %s\n"
-  "The format specification of the lines in the Summary buffer.
-The first specification must always be \"%U%R%X\", at least in this
-version of Gnus.
+(defvar gnus-summary-line-format "%U%R%z%I%(%[%4L: %-20,20n%]%) %s\n"
+  "*The format specification of the lines in the summary buffer.
 
 It works along the same lines as a normal formatting string,
 with some simple extensions.
 
 
 It works along the same lines as a normal formatting string,
 with some simple extensions.
 
-%N   Article number, left padded with spaces (integer)
+%N   Article number, left padded with spaces (string)
 %S   Subject (string)
 %s   Subject if it is at the root of a thread, and \"\" otherwise (string)
 %n   Name of the poster (string)
 %A   Address of the poster (string)
 %S   Subject (string)
 %s   Subject if it is at the root of a thread, and \"\" otherwise (string)
 %n   Name of the poster (string)
 %A   Address of the poster (string)
-%L   Number of lines in the article (integer)
+%F   Contents of the From: header (string)
+%x   Contents of the Xref: header (string)
 %D   Date of the article (string)
 %D   Date of the article (string)
+%d   Date of the article (string) in DD-MMM format
+%M   Message-id of the article (string)
+%r   References of the article (string)
+%c   Number of characters in the article (integer)
+%L   Number of lines in the article (integer)
 %I   Indentation based on thread level (a string of spaces)
 %T   A string with two possible values: 80 spaces if the article
      is on thread level two or larger and 0 spaces on level one
 %I   Indentation based on thread level (a string of spaces)
 %T   A string with two possible values: 80 spaces if the article
      is on thread level two or larger and 0 spaces on level one
-%C   This is the current article (character, \"+\" or \" \")
-%U   Status of this article (character, \"D\", \"K\", \"-\" or \" \") 
-%[   Opening bracket (character, \"[\" or \"=\")
-%]   Closing bracket (character, \"]\" or \"=\")
+%R   \"R\" if this article has been replied to, \" \" otherwise (character)
+%U   Status of this article (character, \"D\", \"K\", \"-\" or \" \")
+%[   Opening bracket (character, \"[\" or \"<\")
+%]   Closing bracket (character, \"]\" or \">\")
 %>   Spaces of length thread-level (string)
 %<   Spaces of length (- 20 thread-level) (string)
 %>   Spaces of length thread-level (string)
 %<   Spaces of length (- 20 thread-level) (string)
-%i   Article interest (integer, 0-9)
-")
-
-(defconst gnus-summary-dummy-line-format "*   :                          : %S\n"
-  "The format specification for the dummy roots in the Summary buffer.
+%i   Article score (number)
+%z   Article zcore (character)
+%t   Number of articles under the current thread (number).
+%e   Whether the thread is empty or not (character).
+%u   User defined specifier. The next character in the format string should
+     be a letter.  Gnus will call the function gnus-user-format-function-X,
+     where X is the letter following %u. The function will be passed the
+     current header as argument. The function should return a string, which
+     will be inserted into the summary just like information from any other
+     summary specifier.
+
+Text between %( and %) will be highlighted with `gnus-mouse-face'
+when the mouse point is placed inside the area.  There can only be one
+such area.
+
+The %U (status), %R (replied) and %z (zcore) specs have to be handled
+with care. For reasons of efficiency, Gnus will compute what column
+these characters will end up in, and \"hard-code\" that. This means that
+it is illegal to have these specs after a variable-length spec. Well,
+you might not be arrested, but your summary buffer will look strange,
+which is bad enough.
+
+The smart choice is to have these specs as for to the left as
+possible. 
+
+This restriction may disappear in later versions of Gnus.")
+
+(defvar gnus-summary-dummy-line-format "*  :                          : %S\n"
+  "*The format specification for the dummy roots in the summary buffer.
 It works along the same lines as a normal formatting string,
 with some simple extensions.
 
 %S  The subject")
 
 (defvar gnus-summary-mode-line-format "(ding) %G/%A %Z"
 It works along the same lines as a normal formatting string,
 with some simple extensions.
 
 %S  The subject")
 
 (defvar gnus-summary-mode-line-format "(ding) %G/%A %Z"
-  "The format specification for the Summary mode line.")
+  "*The format specification for the summary mode line.")
 
 (defvar gnus-article-mode-line-format "(ding) %G/%A %S"
 
 (defvar gnus-article-mode-line-format "(ding) %G/%A %S"
-  "The format specification for the Article mode line.")
+  "*The format specification for the article mode line.")
 
 
-(defconst gnus-group-mode-line-format "(ding) List of Newsgroups   {%M:%S}"
-  "The format specification for the Newsgroup mode line.")
-
-
-\f
-;; Site dependent variables. You have to define these variables in
-;;  site-init.el, default.el or your .emacs.
-
-(defvar gnus-local-timezone nil
-  "Local time zone.
-This value is used only if `current-time-zone' does not work in your Emacs.
-It specifies the GMT offset, i.e. a decimal integer
-of the form +-HHMM giving the hours and minutes ahead of (i.e. east of) GMT.
-For example, +0900 should be used in Japan, since it is 9 hours ahead of GMT.
-
-For backwards compatibility, it may also be a string like \"JST\",
-but strings are obsolescent: you should use numeric offsets instead.")
-
-(defvar gnus-local-domain nil
-  "Local domain name without a host name like: \"stars.flab.Fujitsu.CO.JP\"
-The `DOMAINNAME' environment variable is used instead if defined.  If
-the function (system-name) returns the full internet name, there is no
-need to define the name.")
-
-(defvar gnus-local-organization nil
-  "Local organization like: \"Fujitsu Laboratories Ltd., Kawasaki, Japan.\"
-The `ORGANIZATION' environment variable is used instead if defined.")
-
-(defvar gnus-use-generic-from nil
-  "If nil, prepend local host name to the defined domain in the From:
-field; if stringp, use this; if non-nil, strip of the local host name.")
-
-(defvar gnus-use-generic-path nil
-  "If nil, use the NNTP server name in the Path: field; if stringp,
-use this; if non-nil, use no host name (user name only)")
+(defvar gnus-group-mode-line-format "(ding) List of groups   {%M:%S}  "
+  "*The format specification for the group mode line.")
 
 (defvar gnus-valid-select-methods
 
 (defvar gnus-valid-select-methods
-  '(("nntp" post) ("nnspool" post) ("nnvirtual" none) 
-    ("nnmail" mail respool) ("nnml" mail respool)
-    ("nnmh" mail respool))
-  "A list of valid select methods.
-Each element in this list should be a list. The first element of these
-lists should be a string with the name of the select method. The
-other elements may be be the category of this method (ie. `post',
-`mail', `none' or whatever) or other properties that this method has
-(like being respoolable). 
+  '(("nntp" post address prompt-address)
+    ("nnspool" post)
+    ("nnvirtual" none virtual prompt-address) 
+    ("nnmbox" mail respool) 
+    ("nnml" mail respool)
+    ("nnmh" mail respool) 
+    ("nndir" none prompt-address address)
+    ("nndigest" none) 
+    ("nndoc" none prompt-address) 
+    ("nnbabyl" mail respool) 
+    ("nnkiboze" none virtual) 
+    ("nnfolder" mail respool))
+  "An alist of valid select methods.
+The first element of each list lists should be a string with the name
+of the select method. The other elements may be be the category of
+this method (ie. `post', `mail', `none' or whatever) or other
+properties that this method has (like being respoolable).
 If you implement a new select method, all you should have to change is
 this variable. I think.")
 
 (defvar gnus-updated-mode-lines '(group article summary)
 If you implement a new select method, all you should have to change is
 this variable. I think.")
 
 (defvar gnus-updated-mode-lines '(group article summary)
-  "This variable is a list of buffers that should keep their mode lines updated.
+  "*List of buffers that should update their mode lines.
 The list may contain the symbols `group', `article' and `summary'. If
 the corresponding symbol is present, Gnus will keep that mode line
 updated with information that may be pertinent. 
 If this variable is nil, screen refresh may be quicker.")
 
 The list may contain the symbols `group', `article' and `summary'. If
 the corresponding symbol is present, Gnus will keep that mode line
 updated with information that may be pertinent. 
 If this variable is nil, screen refresh may be quicker.")
 
+;; Added by Keinonen Kari <kk85613@cs.tut.fi>.
+(defvar gnus-mode-non-string-length 21
+  "*Max length of mode-line non-string contents.
+If this is nil, Gnus will take space as is needed, leaving the rest
+of the modeline intact.")
+
 ;; Added by Per Abrahamsen <amanda@iesd.auc.dk>.
 (defvar gnus-mouse-face 'highlight
 ;; Added by Per Abrahamsen <amanda@iesd.auc.dk>.
 (defvar gnus-mouse-face 'highlight
-  "Face used for mouse highlighting in Gnus.
+  "*Face used for mouse highlighting in Gnus.
 No mouse highlights will be done if `gnus-visual' is nil.")
 
 No mouse highlights will be done if `gnus-visual' is nil.")
 
-(defvar gnus-visual-summary-update-hook 
-  (list 'gnus-visual-summary-highlight-line)
-  "A hook called when a summary line is changed.
-The cursor will be positioned at the summary line.
+(defvar gnus-summary-mark-below nil
+  "*Mark all articles with a score below this variable as read.
+This variable is local to each summary buffer and usually set by the
+score file.")  
 
 
-The default hook `gnus-visual-summary-highlight-line' will highlight the line
-according to the `gnus-visual-summary-highlight' variable.")
+(defvar gnus-thread-sort-functions '(gnus-thread-sort-by-number)
+  "*List of functions used for sorting threads in the summary buffer.
+By default, threads are sorted by article number.
 
 
-\f
-;; Internal variables
+Each function takes two threads and return non-nil if the first thread
+should be sorted before the other.  If you use more than one function,
+the primary sort function should be the last.
 
 
-;; Avoid highlighting in kill files.
-(defvar gnus-summary-inhibit-highlight nil)
+Ready-mady functions include `gnus-thread-sort-by-number',
+`gnus-thread-sort-by-author', `gnus-thread-sort-by-subject',
+`gnus-thread-sort-by-date', `gnus-thread-sort-by-score' and
+`gnus-thread-sort-by-total-score' (see `gnus-thread-score-function').")
 
 
-(defvar caesar-translate-table nil)
+(defvar gnus-thread-score-function '+
+  "*Function used for calculating the total score of a thread.
 
 
-(defvar gnus-dribble-buffer nil)
+The function is called with the scores of the article and each
+subthread and should then return the score of the thread.
 
 
-(defvar gnus-article-reply nil)
-(defvar gnus-article-check-size nil)
+Some functions you can use are `+', `max', or `min'.")
 
 
-(defvar gnus-newsgroup-dependencies nil)
+(defvar gnus-options-subscribe nil
+  "*All new groups matching this regexp will be subscribed unconditionally.
+Note that this variable deals only with new newsgroups.  This variable
+does not affect old newsgroups.")
 
 
-(defconst gnus-group-edit-buffer "*Gnus edit newsgroup*")
+(defvar gnus-options-not-subscribe nil
+  "*All new groups matching this regexp will be ignored.
+Note that this variable deals only with new newsgroups.  This variable
+does not affect old (already subscribed) newsgroups.")
 
 
-(defvar gnus-default-subscribe-level 2
-  "Default subscription level.")
+(defvar gnus-auto-expirable-newsgroups nil
+  "*Groups in which to automatically mark read articles as expirable.
+If non-nil, this should be a regexp that should match all groups in
+which to perform auto-expiry.  This only makes sense for mail groups.")
 
 
-(defvar gnus-default-unsubscribe-level 6
-  "Default unsubscription level.")
+(defvar gnus-hidden-properties '(invisible t intangible t)
+  "Property list to use for hiding text.")
 
 
-(defvar gnus-default-kill-level 9
-  "Default kill level.")
+;; Hooks.
 
 
-(defconst gnus-group-line-format-alist
-  (list (list ?M 'marked ?c)
-       (list ?S 'subscribed ?c)
-       (list ?L 'level ?d)
-       (list ?N 'number ?s)
-       (list ?I 'number-of-dormant ?d)
-       (list ?T 'number-of-ticked ?d)
-       (list ?R 'number-of-read ?s)
-       (list ?t 'number-total ?d)
-       (list ?y 'number-of-unread-unticked ?s)
-       (list ?i 'number-of-ticked-and-dormant ?d)
-       (list ?G 'group ?s)
-       (list ?D 'newsgroup-description ?s)
-       (list ?o 'moderated ?c)
-       (list ?O 'moderated-string ?s)
-       (list ?s 'news-server ?s)
-       (list ?n 'news-method ?s)
-       (list ?z 'news-method-string ?s)))
+(defvar gnus-group-mode-hook nil
+  "*A hook for Gnus group mode.")
 
 
-(defconst gnus-summary-line-format-alist 
-  (list (list ?N 'number ?d)
-       (list ?S 'subject ?s)
-       (list ?s 'subject-or-nil ?s)
-       (list ?n 'name ?s)
-       (list ?A 'address ?s)
-       (list ?F 'from ?s)
-       (list ?x (macroexpand '(header-xref header)) ?s)
-       (list ?D (macroexpand '(header-date header)) ?s)
-       (list ?M (macroexpand '(header-id header)) ?s)
-       (list ?r (macroexpand '(header-references header)) ?s)
-       (list ?L 'lines ?d)
-       (list ?I 'indentation ?s)
-       (list ?T '(thread-space (if (< level 1) "" (make-string (frame-width) ? ))) 
-             ?s)
-       (list ?C '(if current ?+ ? ) ?c)
-       (list ?R 'replied ?c)
-       (list ?X 'expirable ?c)
-       (list ?\[ 'opening-bracket ?c)
-       (list ?\] 'closing-bracket ?c)
-       (list ?\> '(make-string level ? ) ?s)
-       (list ?\< '(make-string (max 0 (- 20 level)) ? ) ?s)
-       (list ?i 'interest ?s)
-       (list ?U 'unread ?c))
-  "An alist of format specifications that can appear in summary lines,
-and what variables they correspond with, along with the type of the
-variable (string, integer, character, etc).")
+(defvar gnus-summary-mode-hook nil
+  "*A hook for Gnus summary mode.")
+
+(defvar gnus-article-mode-hook nil
+  "*A hook for Gnus article mode.")
+
+(defvar gnus-open-server-hook nil
+  "*A hook called just before opening connection to the news server.")
+
+(defvar gnus-startup-hook nil
+  "*A hook called at startup.
+This hook is called after Gnus is connected to the NNTP server.")
+
+(defvar gnus-get-new-news-hook nil
+  "*A hook run just before Gnus checks for new news.")
+
+(defvar gnus-group-prepare-function 'gnus-group-prepare-flat
+  "*A function that is called to generate the group buffer.
+The function is called with three arguments: The first is a number;
+all group with a level less or equal to that number should be listed,
+if the second is non-nil, empty groups should also be displayed. If
+the third is non-nil, it is a number. No groups with a level lower
+than this number should be displayed.
+
+The only current function implemented is `gnus-group-prepare-flat'.")
+
+(defvar gnus-group-prepare-hook nil
+  "*A hook called after the group buffer has been generated.
+If you want to modify the group buffer, you can use this hook.")
+
+(defvar gnus-summary-prepare-hook nil
+  "*A hook called after the summary buffer has been generated.
+If you want to modify the summary buffer, you can use this hook.")
+
+(defvar gnus-article-prepare-hook nil
+  "*A hook called after an article has been prepared in the article buffer.
+If you want to run a special decoding program like nkf, use this hook.")
+
+(defvar gnus-article-display-hook nil
+  "*A hook called after the article is displayed in the article buffer.
+The hook is designed to change the contents of the article
+buffer. Typical functions that this hook may contain are
+`gnus-article-hide-headers' (hide selected headers),
+`gnus-article-maybe-highlight' (perform fancy article highlighting), 
+`gnus-article-hide-signature' (hide signature) and
+`gnus-article-treat-overstrike' (turn \"^H_\" into bold characters).")
+(add-hook 'gnus-article-display-hook 'gnus-article-hide-headers-if-wanted)
+(add-hook 'gnus-article-display-hook 'gnus-article-treat-overstrike)
+
+(defvar gnus-article-x-face-command
+  "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | xv -quit -"
+  "String or function to be executed to display an X-Face header.
+If it is a string, the command will be executed in a sub-shell
+asynchronously. The compressed face will be piped to this command.") 
+
+(defvar gnus-article-x-face-too-ugly nil
+  "Regexp matching posters whose face shouldn't be shown automatically.")
+
+(defvar gnus-select-group-hook nil
+  "*A hook called when a newsgroup is selected.
+
+If you'd like to simplify subjects like the
+`gnus-summary-next-same-subject' command does, you can use the
+following hook:
+
+ (setq gnus-select-group-hook
+      (list
+       (lambda ()
+         (mapcar (lambda (header)
+                    (header-set-subject
+                     header
+                     (gnus-simplify-subject
+                      (header-subject header) 're-only)))
+                 gnus-newsgroup-headers))))")
+
+(defvar gnus-select-article-hook
+  '(gnus-summary-show-thread)
+  "*A hook called when an article is selected.
+The default hook shows conversation thread subtrees of the selected
+article automatically using `gnus-summary-show-thread'.")
+
+(defvar gnus-apply-kill-hook '(gnus-apply-kill-file)
+  "*A hook called to apply kill files to a group.
+This hook is intended to apply a kill file to the selected newsgroup.
+The function `gnus-apply-kill-file' is called by default.
+
+Since a general kill file is too heavy to use only for a few
+newsgroups, I recommend you to use a lighter hook function. For
+example, if you'd like to apply a kill file to articles which contains
+a string `rmgroup' in subject in newsgroup `control', you can use the
+following hook:
+
+\(setq gnus-apply-kill-hook
+      (list
+       (lambda ()
+         (cond ((string-match \"control\" gnus-newsgroup-name)
+                (gnus-kill \"Subject\" \"rmgroup\")
+                (gnus-expunge \"X\"))))))")
+
+(defvar gnus-visual-mark-article-hook 
+  (list 'gnus-highlight-selected-summary)
+  "*Hook run after selecting an article in the summary buffer.
+It is meant to be used for highlighting the article in some way.  It
+is not run if `gnus-visual' is nil.")
+
+(defvar gnus-prepare-article-hook (list 'gnus-inews-insert-signature)
+  "*A hook called after preparing body, but before preparing header headers.
+The default hook (`gnus-inews-insert-signature') inserts a signature
+file specified by the variable `gnus-signature-file'.")
+
+(defvar gnus-exit-group-hook nil
+  "*A hook called when exiting (not quitting) summary mode.")
+
+(defvar gnus-suspend-gnus-hook nil
+  "*A hook called when suspending (not exiting) Gnus.")
+
+(defvar gnus-exit-gnus-hook nil
+  "*A hook called when exiting Gnus.")
+
+(defvar gnus-save-newsrc-hook nil
+  "*A hook called when saving the newsrc file.")
+
+(defvar gnus-summary-update-hook 
+  (list 'gnus-summary-highlight-line)
+  "*A hook called when a summary line is changed.
+The hook will not be called if `gnus-visual' is nil.
+
+The default function `gnus-summary-highlight-line' will
+highlight the line according to the `gnus-summary-highlight'
+variable.")
+
+(defvar gnus-mark-article-hook (list 'gnus-summary-mark-unread-as-read)
+  "*A hook called when an article is selected for the first time.
+The hook is intended to mark an article as read (or unread)
+automatically when it is selected.")
+
+\f
+;; Internal variables
+
+;; Avoid highlighting in kill files.
+(defvar gnus-summary-inhibit-highlight nil)
+(defvar gnus-newsgroup-selected-overlay nil)
+
+(defvar gnus-article-mode-map nil)
+(defvar caesar-translate-table nil)
+(defvar gnus-dribble-buffer nil)
+(defvar gnus-headers-retrieved-by nil)
+(defvar gnus-article-reply nil)
+(defvar gnus-override-method nil)
+(defvar gnus-article-check-size nil)
+
+(defvar gnus-current-move-group nil)
+
+(defvar gnus-newsgroup-dependencies nil)
+(defvar gnus-newsgroup-threads nil)
+(defvar gnus-newsgroup-async nil)
+(defconst gnus-group-edit-buffer "*Gnus edit newsgroup*")
+
+(defvar gnus-newsgroup-adaptive nil)
+
+(defconst gnus-group-line-format-alist
+  (list (list ?M 'marked ?c)
+       (list ?S 'subscribed ?c)
+       (list ?L 'level ?d)
+       (list ?N 'number ?s)
+       (list ?I 'number-of-dormant ?d)
+       (list ?T 'number-of-ticked ?d)
+       (list ?R 'number-of-read ?s)
+       (list ?t 'number-total ?d)
+       (list ?y 'number-of-unread-unticked ?s)
+       (list ?i 'number-of-ticked-and-dormant ?d)
+       (list ?g 'group ?s)
+       (list ?G 'qualified-group ?s)
+       (list ?D 'newsgroup-description ?s)
+       (list ?o 'moderated ?c)
+       (list ?O 'moderated-string ?s)
+       (list ?s 'news-server ?s)
+       (list ?n 'news-method ?s)
+       (list ?z 'news-method-string ?s)
+       (list ?u 'user-defined ?s)))
+
+(defconst gnus-summary-line-format-alist 
+  (list (list ?N 'number ?d)
+       (list ?S 'subject ?s)
+       (list ?s 'subject-or-nil ?s)
+       (list ?n 'name ?s)
+       (list ?A 'address ?s)
+       (list ?F 'from ?s)
+       (list ?x (macroexpand '(header-xref header)) ?s)
+       (list ?D (macroexpand '(header-date header)) ?s)
+       (list ?d '(gnus-dd-mmm (header-date header)) ?s)
+       (list ?M (macroexpand '(header-id header)) ?s)
+       (list ?r (macroexpand '(header-references header)) ?s)
+       (list ?c '(or (header-chars header) 0) ?d)
+       (list ?L 'lines ?d)
+       (list ?I 'indentation ?s)
+       (list ?T '(if (= level 0) "" (make-string (frame-width) ? )) ?s)
+       (list ?R 'replied ?c)
+       (list ?\[ 'opening-bracket ?c)
+       (list ?\] 'closing-bracket ?c)
+       (list ?\> '(make-string level ? ) ?s)
+       (list ?\< '(make-string (max 0 (- 20 level)) ? ) ?s)
+       (list ?i 'score ?d)
+       (list ?z 'score-char ?c)
+       (list ?U 'unread ?c)
+       (list ?t '(gnus-summary-number-of-articles-in-thread 
+                  (or gnus-tmp-adopt-thread 
+                      (if (boundp 'thread) (symbol-value 'thread)
+                        thread nil)))
+                  ?d)
+       (list ?e '(gnus-summary-number-of-articles-in-thread 
+                  (or gnus-tmp-adopt-thread 
+                      (if (boundp 'thread) (symbol-value 'thread)
+                        thread nil)) t)
+                  ?d)
+       (list ?u 'user-defined ?s))
+  "An alist of format specifications that can appear in summary lines,
+and what variables they correspond with, along with the type of the
+variable (string, integer, character, etc).")
 
 (defconst gnus-summary-dummy-line-format-alist
   (list (list ?S 'subject ?s)
 
 (defconst gnus-summary-dummy-line-format-alist
   (list (list ?S 'subject ?s)
-       (list ?N 'number ?d)))
+       (list ?N 'number ?d)
+       (list ?u 'user-defined ?s)))
 
 (defconst gnus-summary-mode-line-format-alist 
   (list (list ?G 'group-name ?s)
 
 (defconst gnus-summary-mode-line-format-alist 
   (list (list ?G 'group-name ?s)
+       (list ?g '(gnus-short-group-name group-name) ?s)
        (list ?A 'article-number ?d)
        (list ?Z 'unread-and-unselected ?s)
        (list ?V 'gnus-version ?s)
        (list ?U 'unread ?d)
        (list ?S 'subject ?s)
        (list ?A 'article-number ?d)
        (list ?Z 'unread-and-unselected ?s)
        (list ?V 'gnus-version ?s)
        (list ?U 'unread ?d)
        (list ?S 'subject ?s)
-       (list ?u 'unselected ?d)))
+       (list ?e 'unselected ?d)
+       (list ?u 'user-defined ?s)
+       (list ?s '(gnus-current-score-file-nondirectory) ?s)))
 
 (defconst gnus-group-mode-line-format-alist 
   (list (list ?S 'news-server ?s)
 
 (defconst gnus-group-mode-line-format-alist 
   (list (list ?S 'news-server ?s)
-       (list ?M 'news-method ?s)))
+       (list ?M 'news-method ?s)
+       (list ?u 'user-defined ?s)))
 
 (defvar gnus-have-read-active-file nil)
 
 
 (defvar gnus-have-read-active-file nil)
 
-(defconst gnus-foreign-group-prefix "foreign.")
-
-(defconst gnus-maintainer "Lars Magne Ingebrigtsen <larsi@ifi.uio.no>"
+(defconst gnus-maintainer "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls & Boys)"
   "The mail address of the Gnus maintainer.")
 
   "The mail address of the Gnus maintainer.")
 
-(defconst gnus-version "(ding) Gnus v0.10"
-  "Version numbers of this version of Gnus.")
+(defconst gnus-version "(ding) Gnus v0.71"
+  "Version number for this version of Gnus.")
 
 (defvar gnus-info-nodes
 
 (defvar gnus-info-nodes
-  '((gnus-group-mode           "(gnus)Newsgroup Commands")
-    (gnus-summary-mode         "(gnus)Summary Commands")
-    (gnus-article-mode         "(gnus)Article Commands")
-    (gnus-kill-file-mode       "(gnus)Kill File"))
+  '((gnus-group-mode           "(gnus)The Group Buffer")
+    (gnus-summary-mode         "(gnus)The Summary Buffer")
+    (gnus-article-mode         "(gnus)The Article Buffer"))
   "Assoc list of major modes and related Info nodes.")
 
   "Assoc list of major modes and related Info nodes.")
 
-(defvar gnus-group-buffer "*Newsgroup*")
+(defvar gnus-documentation-group-file "~/dgnus/lisp/doc.txt"
+  "The location of the (ding) Gnus documentation group.")
+
+(defvar gnus-group-buffer "*Group*")
 (defvar gnus-summary-buffer "*Summary*")
 (defvar gnus-article-buffer "*Article*")
 (defvar gnus-summary-buffer "*Summary*")
 (defvar gnus-article-buffer "*Article*")
-(defvar gnus-digest-buffer "Gnus Digest")
-(defvar gnus-digest-summary-buffer "Gnus Digest-summary")
+(defvar gnus-server-buffer "*Server*")
+
+(defvar gnus-work-buffer " *gnus work*")
 
 (defvar gnus-buffer-list nil
 
 (defvar gnus-buffer-list nil
-  "Gnus buffers that should be killed when exiting.")
+  "Gnus buffers that should be killed on exit.")
+
+(defvar gnus-server-alist nil
+  "List of available servers.")
 
 (defvar gnus-variable-list
 
 (defvar gnus-variable-list
-  '(gnus-newsrc-options
-    gnus-newsrc-options-n-yes gnus-newsrc-options-n-no
-    gnus-newsrc-assoc gnus-killed-list gnus-zombie-list)
+  '(gnus-newsrc-options gnus-newsrc-options-n
+    gnus-newsrc-last-checked-date 
+    gnus-newsrc-alist gnus-server-alist
+    gnus-killed-list gnus-zombie-list)
   "Gnus variables saved in the quick startup file.")
 
 (defvar gnus-overload-functions
   "Gnus variables saved in the quick startup file.")
 
 (defvar gnus-overload-functions
@@ -1014,18 +1250,18 @@ It is a list of `(original overload &optional file)'.")
 (defvar gnus-newsrc-options nil
   "Options line in the .newsrc file.")
 
 (defvar gnus-newsrc-options nil
   "Options line in the .newsrc file.")
 
-(defvar gnus-newsrc-options-n-yes nil
-  "Regexp representing subscribed newsgroups.")
+(defvar gnus-newsrc-options-n nil
+  "List of regexps representing groups to be subscribed/ignored unconditionally.") 
 
 
-(defvar gnus-newsrc-options-n-no nil
-  "Regexp representing unsubscribed newsgroups.")
+(defvar gnus-newsrc-last-checked-date nil
+  "Date Gnus last asked server for new newsgroups.")
 
 
-(defvar gnus-newsrc-assoc nil
+(defvar gnus-newsrc-alist nil
   "Assoc list of read articles.
 gnus-newsrc-hashtb should be kept so that both hold the same information.")
 
 (defvar gnus-newsrc-hashtb nil
   "Assoc list of read articles.
 gnus-newsrc-hashtb should be kept so that both hold the same information.")
 
 (defvar gnus-newsrc-hashtb nil
-  "Hashtable of gnus-newsrc-assoc.")
+  "Hashtable of gnus-newsrc-alist.")
 
 (defvar gnus-killed-list nil
   "List of killed newsgroups.")
 
 (defvar gnus-killed-list nil
   "List of killed newsgroups.")
@@ -1037,20 +1273,19 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.")
   "List of almost dead newsgroups.")
 
 (defvar gnus-description-hashtb nil
   "List of almost dead newsgroups.")
 
 (defvar gnus-description-hashtb nil
-  "Descriptions of newsgroups (from the file 'newsgroups').")
+  "Descriptions of newsgroups.")
 
 (defvar gnus-list-of-killed-groups nil
   "List of newsgroups that have recently been killed by the user.")
 
 
 (defvar gnus-list-of-killed-groups nil
   "List of newsgroups that have recently been killed by the user.")
 
-(defvar gnus-xref-hashtb nil
-  "Hash table of cross-posted articles.")
-
 (defvar gnus-active-hashtb nil
   "Hashtable of active articles.")
 
 (defvar gnus-moderated-list nil
   "List of moderated newsgroups.")
 
 (defvar gnus-active-hashtb nil
   "Hashtable of active articles.")
 
 (defvar gnus-moderated-list nil
   "List of moderated newsgroups.")
 
+(defvar gnus-group-marked nil)
+
 (defvar gnus-current-startup-file nil
   "Startup file for the current host.")
 
 (defvar gnus-current-startup-file nil
   "Startup file for the current host.")
 
@@ -1074,10 +1309,8 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.")
 (defvar gnus-newsgroup-last-mail nil)
 (defvar gnus-newsgroup-last-folder nil)
 (defvar gnus-newsgroup-last-file nil)
 (defvar gnus-newsgroup-last-mail nil)
 (defvar gnus-newsgroup-last-folder nil)
 (defvar gnus-newsgroup-last-file nil)
-(defvar gnus-newsgroup-auto-expire nil
-  "If non-nil, all read articles will be marked as expirable.")
-
-(defvar gnus-newsgroup-selected-overlay nil)
+(defvar gnus-newsgroup-auto-expire nil)
+(defvar gnus-newsgroup-active nil)
 
 (defvar gnus-newsgroup-unreads nil
   "List of unread articles in the current newsgroup.")
 
 (defvar gnus-newsgroup-unreads nil
   "List of unread articles in the current newsgroup.")
@@ -1089,7 +1322,9 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.")
   "List of ticked articles in the current newsgroup (a subset of unread art).")
 
 (defvar gnus-newsgroup-killed nil
   "List of ticked articles in the current newsgroup (a subset of unread art).")
 
 (defvar gnus-newsgroup-killed nil
-  "List of ranges of articles that have been through the kill process.")
+  "List of ranges of articles that have been through the scoring process.")
+
+(defvar gnus-newsgroup-kill-headers nil)
 
 (defvar gnus-newsgroup-replied nil
   "List of articles that have been replied to in the current newsgroup.")
 
 (defvar gnus-newsgroup-replied nil
   "List of articles that have been replied to in the current newsgroup.")
@@ -1106,26 +1341,26 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.")
 (defvar gnus-newsgroup-dormant nil
   "List of dormant articles in the current newsgroup.")
 
 (defvar gnus-newsgroup-dormant nil
   "List of dormant articles in the current newsgroup.")
 
+(defvar gnus-newsgroup-scored nil
+  "List of scored articles in the current newsgroup.")
+
 (defvar gnus-newsgroup-headers nil
   "List of article headers in the current newsgroup.")
 (defvar gnus-newsgroup-headers-hashtb-by-number nil)
 
 (defvar gnus-newsgroup-headers nil
   "List of article headers in the current newsgroup.")
 (defvar gnus-newsgroup-headers-hashtb-by-number nil)
 
+(defvar gnus-newsgroup-ancient nil
+  "List of `gnus-fetch-old-headers' articles in the current newsgroup.")
+
 (defvar gnus-current-article nil)
 (defvar gnus-article-current nil)
 (defvar gnus-current-headers nil)
 (defvar gnus-current-article nil)
 (defvar gnus-article-current nil)
 (defvar gnus-current-headers nil)
-(defvar gnus-have-all-headers nil "Must be either T or NIL.")
+(defvar gnus-have-all-headers nil)
 (defvar gnus-last-article nil)
 (defvar gnus-last-article nil)
+(defvar gnus-newsgroup-history nil)
 (defvar gnus-current-kill-article nil)
 (defvar gnus-current-kill-article nil)
-(defvar gnus-newsgroup-dormant-subjects nil)
-(defvar gnus-newsgroup-expunged-lines nil)
 
 ;; Save window configuration.
 
 ;; Save window configuration.
-(defvar gnus-winconf-kill-file nil)
-
-(defconst gnus-group-mode-map nil)
-(defvar gnus-summary-mode-map nil)
-(defvar gnus-article-mode-map nil)
-(defvar gnus-kill-file-mode-map nil)
+(defvar gnus-prev-winconf nil)
 
 ;; Format specs
 (defvar gnus-summary-line-format-spec nil)
 
 ;; Format specs
 (defvar gnus-summary-line-format-spec nil)
@@ -1134,14 +1369,17 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.")
 (defvar gnus-summary-mode-line-format-spec nil)
 (defvar gnus-article-mode-line-format-spec nil)
 (defvar gnus-group-mode-line-format-spec nil)
 (defvar gnus-summary-mode-line-format-spec nil)
 (defvar gnus-article-mode-line-format-spec nil)
 (defvar gnus-group-mode-line-format-spec nil)
+(defvar gnus-summary-mark-positions nil)
 
 
+(defvar gnus-summary-expunge-below nil)
 (defvar gnus-reffed-article-number nil)
 
 (defvar rmail-default-file (expand-file-name "~/XMBOX"))
 (defvar rmail-default-rmail-file (expand-file-name "~/XNEWS"))
 
 (defconst gnus-summary-local-variables 
 (defvar gnus-reffed-article-number nil)
 
 (defvar rmail-default-file (expand-file-name "~/XMBOX"))
 (defvar rmail-default-rmail-file (expand-file-name "~/XNEWS"))
 
 (defconst gnus-summary-local-variables 
-  '(gnus-newsgroup-name gnus-newsgroup-begin gnus-newsgroup-end 
+  '(gnus-newsgroup-name 
+    gnus-newsgroup-begin gnus-newsgroup-end 
     gnus-newsgroup-last-rmail gnus-newsgroup-last-mail 
     gnus-newsgroup-last-folder gnus-newsgroup-last-file 
     gnus-newsgroup-auto-expire gnus-newsgroup-unreads 
     gnus-newsgroup-last-rmail gnus-newsgroup-last-mail 
     gnus-newsgroup-last-folder gnus-newsgroup-last-file 
     gnus-newsgroup-auto-expire gnus-newsgroup-unreads 
@@ -1149,70 +1387,195 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.")
     gnus-newsgroup-replied gnus-newsgroup-expirable
     gnus-newsgroup-processable gnus-newsgroup-killed
     gnus-newsgroup-bookmarks gnus-newsgroup-dormant
     gnus-newsgroup-replied gnus-newsgroup-expirable
     gnus-newsgroup-processable gnus-newsgroup-killed
     gnus-newsgroup-bookmarks gnus-newsgroup-dormant
-    gnus-newsgroup-dormant-subjects gnus-newsgroup-expunged-lines
     gnus-newsgroup-headers gnus-newsgroup-headers-hashtb-by-number
     gnus-current-article gnus-current-headers gnus-have-all-headers
     gnus-last-article gnus-article-internal-prepare-hook
     gnus-newsgroup-headers gnus-newsgroup-headers-hashtb-by-number
     gnus-current-article gnus-current-headers gnus-have-all-headers
     gnus-last-article gnus-article-internal-prepare-hook
-    gnus-newsgroup-selected-overlay)
-  "Variables that are buffer-local to the Summary buffers.")
-
-(defvar gnus-mark-article-hook
-  (list
-   (lambda ()
-     (or (memq gnus-current-article gnus-newsgroup-marked)
-        (memq gnus-current-article gnus-newsgroup-dormant)
-        (gnus-summary-mark-as-read gnus-current-article))))
-  "A hook called when an article is selected at the first time.
-The hook is intended to mark an article as read (or unread)
-automatically when it is selected.
+    gnus-newsgroup-dependencies gnus-newsgroup-selected-overlay
+    gnus-newsgroup-scored gnus-newsgroup-kill-headers
+    gnus-newsgroup-threads gnus-newsgroup-async
+    gnus-score-alist gnus-current-score-file gnus-summary-expunge-below 
+    gnus-summary-mark-below gnus-newsgroup-active gnus-scores-exclude-files
+    gnus-newsgroup-history gnus-newsgroup-ancient
+    gnus-newsgroup-adaptive)
+  "Variables that are buffer-local to the summary buffers.")
 
 
-If you'd like to tick articles instead, use the following hook:
+(defconst gnus-bug-message
+  "Sending a bug report to the Gnus Towers.
+========================================
 
 
-\(setq gnus-mark-article-hook
-      (list
-        (lambda ()
-         (gnus-summary-tick-article gnus-current-article))))")
+The buffer below is a mail buffer.  When you press `C-c C-c', it will
+be sent to the Gnus Bug Exterminators. 
+
+At the bottom of the buffer you'll see lots of variable settings.
+Please do not delete those.  They will tell the Bug People what your
+environment is, so that it will be easier to locate the bugs.
+
+If you have found a bug that makes Emacs go \"beep\", set
+debug-on-error to t (`M-ESC (setq debug-on-error t)') and include the
+backtrace in your bug report.
+
+Please describe the bug in annoying, painstaking detail.
+
+Thank you for your help in stamping out bugs.
+")
 
 
-;; Define some autoload functions Gnus may use.
+;;; End of variables.
+
+;; Define some autoload functions Gnus might use.
 (eval-and-compile
 (eval-and-compile
+
+  ;; Various 
   (autoload 'metamail-buffer "metamail")
   (autoload 'Info-goto-node "info")
   (autoload 'metamail-buffer "metamail")
   (autoload 'Info-goto-node "info")
-  
+  (autoload 'hexl-hex-string-to-integer "hexl")
+  (autoload 'pp "pp")
+  (autoload 'pp-to-string "pp")
+  (autoload 'pp-eval-expression "pp")
+  (autoload 'mail-extract-address-components "mail-extr")
+
+  (autoload 'nnmail-split-fancy "nnmail")
+
+  ;; timezone
   (autoload 'timezone-make-date-arpa-standard "timezone")
   (autoload 'timezone-fix-time "timezone")
   (autoload 'timezone-make-sortable-date "timezone")
   (autoload 'timezone-make-time-string "timezone")
   (autoload 'timezone-make-date-arpa-standard "timezone")
   (autoload 'timezone-fix-time "timezone")
   (autoload 'timezone-make-sortable-date "timezone")
   (autoload 'timezone-make-time-string "timezone")
-  
-  (autoload 'rmail-output "rmailout"
-    "Append this message to Unix mail file named FILE-NAME." t)
+
+  ;; rmail & friends
   (autoload 'mail-position-on-field "sendmail")
   (autoload 'mail-setup "sendmail")
   (autoload 'mail-position-on-field "sendmail")
   (autoload 'mail-setup "sendmail")
-
+  (autoload 'rmail-output "rmailout")
+  (autoload 'news-mail-other-window "rnewspost")
+  (autoload 'news-reply-yank-original "rnewspost")
+  (autoload 'news-caesar-buffer-body "rnewspost")
+  (autoload 'rmail-insert-rmail-file-header "rmail")
+  (autoload 'rmail-count-new-messages "rmail")
+  (autoload 'rmail-show-message "rmail")
+
+  ;; gnus-mh
   (autoload 'gnus-mail-reply-using-mhe "gnus-mh")
   (autoload 'gnus-mail-forward-using-mhe "gnus-mh")
   (autoload 'gnus-mail-other-window-using-mhe "gnus-mh")
   (autoload 'gnus-summary-save-in-folder "gnus-mh")
   (autoload 'gnus-Folder-save-name "gnus-mh")
   (autoload 'gnus-folder-save-name "gnus-mh")
   (autoload 'gnus-mail-reply-using-mhe "gnus-mh")
   (autoload 'gnus-mail-forward-using-mhe "gnus-mh")
   (autoload 'gnus-mail-other-window-using-mhe "gnus-mh")
   (autoload 'gnus-summary-save-in-folder "gnus-mh")
   (autoload 'gnus-Folder-save-name "gnus-mh")
   (autoload 'gnus-folder-save-name "gnus-mh")
-  
-  (autoload 'gnus-group-make-menu-bar "gnus-visual")
-  (autoload 'gnus-summary-make-menu-bar "gnus-visual")
-  (autoload 'gnus-visual-highlight-selected-summary "gnus-visual")
-  (autoload 'gnus-visual-summary-highlight-line "gnus-visual")
-  )
 
 
-(put 'gnus-group-mode 'mode-class 'special)
-(put 'gnus-summary-mode 'mode-class 'special)
-(put 'gnus-article-mode 'mode-class 'special)
+  ;; gnus-vis misc
+  (autoload 'gnus-group-make-menu-bar "gnus-vis")
+  (autoload 'gnus-summary-make-menu-bar "gnus-vis")
+  (autoload 'gnus-server-make-menu-bar "gnus-vis")
+  (autoload 'gnus-article-make-menu-bar "gnus-vis")
+  (autoload 'gnus-browse-make-menu-bar "gnus-vis")
+  (autoload 'gnus-highlight-selected-summary "gnus-vis")
+  (autoload 'gnus-summary-highlight-line "gnus-vis")
+  (autoload 'gnus-carpal-setup-buffer "gnus-vis")
+
+  ;; gnus-vis article
+  (autoload 'gnus-article-push-button "gnus-vis" nil t)
+  (autoload 'gnus-article-press-button "gnus-vis" nil t)
+  (autoload 'gnus-article-highlight "gnus-vis" nil t)
+  (autoload 'gnus-article-hide "gnus-vis" nil t)
+  (autoload 'gnus-article-hide-signature "gnus-vis" nil t)
+  (autoload 'gnus-article-highlight-headers "gnus-vis" nil t)
+  (autoload 'gnus-article-highlight-signature "gnus-vis" nil t)
+  (autoload 'gnus-article-add-buttons "gnus-vis" nil t)
+  (autoload 'gnus-article-next-button "gnus-vis" nil t)
+  (autoload 'gnus-article-add-button "gnus-vis")
+
+  ;; gnus-cite
+  (autoload 'gnus-article-highlight-citation "gnus-cite" nil t)
+  (autoload 'gnus-article-hide-citation-maybe "gnus-cite" nil t)
+  (autoload 'gnus-article-hide-citation "gnus-cite" nil t)
+
+  ;; gnus-kill
+  (autoload 'gnus-kill "gnus-kill")
+  (autoload 'gnus-apply-kill-file-internal "gnus-kill")
+  (autoload 'gnus-kill-file-edit-file "gnus-kill")
+  (autoload 'gnus-kill-file-raise-followups-to-author "gnus-kill")
+  (autoload 'gnus-execute "gnus-kill")
+  (autoload 'gnus-expunge "gnus-kill")
+
+  ;; gnus-cache
+  (autoload 'gnus-cache-possibly-enter-article "gnus-cache")
+  (autoload 'gnus-cache-save-buffers "gnus-cache")
+  (autoload 'gnus-cache-possibly-remove-article "gnus-cache")
+  (autoload 'gnus-cache-request-article "gnus-cache")
+  (autoload 'gnus-cache-retrieve-headers "gnus-cache")
+  (autoload 'gnus-cache-possibly-alter-active "gnus-cache")
+  (autoload 'gnus-jog-cache "gnus-cache" nil t)
+
+  ;; gnus-score
+  (autoload 'gnus-summary-increase-score "gnus-score" nil t)
+  (autoload 'gnus-summary-lower-score "gnus-score" nil t)
+  (autoload 'gnus-summary-score-map "gnus-score" nil nil 'keymap)
+  (autoload 'gnus-score-save "gnus-score")
+  (autoload 'gnus-score-headers "gnus-score")
+  (autoload 'gnus-current-score-file-nondirectory "gnus-score")
+  (autoload 'gnus-score-adaptive "gnus-score")
+  (autoload 'gnus-score-remove-lines-adaptive "gnus-score")
+  (autoload 'gnus-possibly-score-headers "gnus-score")
+
+  ;; gnus-uu
+  (autoload 'gnus-uu-extract-map "gnus-uu" nil nil 'keymap)
+  (autoload 'gnus-uu-mark-map "gnus-uu" nil nil 'keymap)
+  (autoload 'gnus-uu-digest-mail-forward "gnus-uu" nil t)
+  (autoload 'gnus-uu-digest-post-forward "gnus-uu" nil t)
+  (autoload 'gnus-uu-mark-series "gnus-uu" nil t)
+  (autoload 'gnus-uu-mark-region "gnus-uu" nil t)
+  (autoload 'gnus-uu-mark-by-regexp "gnus-uu" nil t)
+  (autoload 'gnus-uu-mark-all "gnus-uu" nil t)
+  (autoload 'gnus-uu-mark-sparse "gnus-uu" nil t)
+  (autoload 'gnus-uu-mark-thread "gnus-uu" nil t)
+  (autoload 'gnus-uu-decode-uu "gnus-uu" nil t)
+  (autoload 'gnus-uu-decode-uu-and-save "gnus-uu" nil t)
+  (autoload 'gnus-uu-decode-unshar "gnus-uu" nil t)
+  (autoload 'gnus-uu-decode-unshar-and-save "gnus-uu" nil t)
+  (autoload 'gnus-uu-decode-save "gnus-uu" nil t)
+  (autoload 'gnus-uu-decode-binhex "gnus-uu" nil t)
+
+  ;; gnus-msg
+  (autoload 'gnus-summary-send-map "gnus-msg" nil nil 'keymap)
+  (autoload 'gnus-group-post-news "gnus-msg" nil t)
+  (autoload 'gnus-summary-post-news "gnus-msg" nil t)
+  (autoload 'gnus-summary-followup "gnus-msg" nil t)
+  (autoload 'gnus-summary-followup-with-original "gnus-msg" nil t)
+  (autoload 'gnus-summary-followup-and-reply "gnus-msg" nil t)
+  (autoload 'gnus-summary-followup-and-reply-with-original "gnus-msg" nil t)
+  (autoload 'gnus-summary-cancel-article "gnus-msg" nil t)
+  (autoload 'gnus-summary-supersede-article "gnus-msg" nil t)
+  (autoload 'gnus-post-news "gnus-msg" nil t)
+  (autoload 'gnus-inews-news "gnus-msg" nil t)
+  (autoload 'gnus-cancel-news "gnus-msg" nil t)
+  (autoload 'gnus-summary-reply "gnus-msg" nil t)
+  (autoload 'gnus-summary-reply-with-original "gnus-msg" nil t)
+  (autoload 'gnus-summary-mail-forward "gnus-msg" nil t)
+  (autoload 'gnus-summary-mail-other-window "gnus-msg" nil t)
+  (autoload 'gnus-mail-reply-using-mail "gnus-msg")
+  (autoload 'gnus-mail-yank-original "gnus-msg")
+  (autoload 'gnus-mail-send-and-exit "gnus-msg")
+  (autoload 'gnus-mail-forward-using-mail "gnus-msg")
+  (autoload 'gnus-mail-other-window-using-mail "gnus-msg")
+  (autoload 'gnus-article-mail-with-original "gnus-msg")
+  (autoload 'gnus-article-mail "gnus-msg")
+
+  ;; gnus-vm
+  (autoload 'gnus-summary-save-in-vm "gnus-vm" nil t)
+  (autoload 'gnus-mail-forward-using-vm "gnus-vm")
+  (autoload 'gnus-mail-reply-using-vm "gnus-vm")
+  (autoload 'gnus-mail-other-window-using-vm "gnus-vm" nil t)
+  (autoload 'gnus-yank-article "gnus-vm" nil t)
+
+  )
 
 
-(autoload 'gnus-uu-ctl-map "gnus-uu" nil nil 'keymap)
 \f
 
 ;; Fix by Hallvard B Furuseth <h.b.furuseth@usit.uio.no>.
 \f
 
 ;; Fix by Hallvard B Furuseth <h.b.furuseth@usit.uio.no>.
-(defun gnus-summary-position-cursor () nil)
-(defun gnus-group-position-cursor () nil)
-(fset 'gnus-summary-position-cursor 'gnus-goto-colon)
-(fset 'gnus-group-position-cursor 'gnus-goto-colon)
+;; If you want the cursor to go somewhere else, set these two
+;; functions in some startup hook to whatever you want.
+(defalias 'gnus-summary-position-cursor 'gnus-goto-colon)
+(defalias 'gnus-group-position-cursor 'gnus-goto-colon)
+
+;;; Various macros and substs.
 
 (defmacro gnus-eval-in-buffer-window (buffer &rest forms)
   "Pop to BUFFER, evaluate FORMS, and then returns to original window."
 
 (defmacro gnus-eval-in-buffer-window (buffer &rest forms)
   "Pop to BUFFER, evaluate FORMS, and then returns to original window."
@@ -1223,13 +1586,6 @@ If you'd like to tick articles instead, use the following hook:
             (,@ forms))
         (select-window GnusStartBufferWindow)))))
 
             (,@ forms))
         (select-window GnusStartBufferWindow)))))
 
-(defun gnus-make-hashtable (&optional hashsize)
-  "Make a hash table (default and minimum size is 255).
-Optional argument HASHSIZE specifies the table size."
-  (make-vector (if hashsize 
-                  (max (gnus-create-hash-size hashsize) 255)
-                255) 0))
-
 (defmacro gnus-gethash (string hashtable)
   "Get hash value of STRING in HASHTABLE."
   ;;(` (symbol-value (abbrev-symbol (, string) (, hashtable))))
 (defmacro gnus-gethash (string hashtable)
   "Get hash value of STRING in HASHTABLE."
   ;;(` (symbol-value (abbrev-symbol (, string) (, hashtable))))
@@ -1239,7 +1595,7 @@ Optional argument HASHSIZE specifies the table size."
 (defmacro gnus-sethash (string value hashtable)
   "Set hash value. Arguments are STRING, VALUE, and HASHTABLE."
   ;; We cannot use define-abbrev since it only accepts string as value.
 (defmacro gnus-sethash (string value hashtable)
   "Set hash value. Arguments are STRING, VALUE, and HASHTABLE."
   ;; We cannot use define-abbrev since it only accepts string as value.
- (set (intern string hashtable) value))
+  ;; (set (intern string hashtable) value))
   (` (set (intern (, string) (, hashtable)) (, value))))
 
 (defsubst gnus-buffer-substring (beg end)
   (` (set (intern (, string) (, hashtable)) (, value))))
 
 (defsubst gnus-buffer-substring (beg end)
@@ -1252,6 +1608,34 @@ Optional argument HASHSIZE specifies the table size."
        (substring subject (match-end 0))
       subject)))
 
        (substring subject (match-end 0))
       subject)))
 
+(defsubst gnus-goto-char (point)
+  (and point (goto-char point)))
+
+(defmacro gnus-buffer-exists-p (buffer)
+  (` (and (, buffer)
+         (funcall (if (stringp (, buffer)) 'get-buffer 'buffer-name)
+                  (, buffer)))))
+
+(defmacro gnus-kill-buffer (buffer)
+  (` (if (gnus-buffer-exists-p (, buffer))
+        (kill-buffer (, buffer)))))
+
+(defsubst gnus-point-at-bol ()
+  "Return point at the beginning of line."
+  (let ((p (point)))
+    (beginning-of-line)
+    (prog1
+       (point)
+      (goto-char p))))
+
+(defsubst gnus-point-at-eol ()
+  "Return point at the beginning of line."
+  (let ((p (point)))
+    (end-of-line)
+    (prog1
+       (point)
+      (goto-char p))))
+
 \f
 ;;;
 ;;; Gnus Utility Functions
 \f
 ;;;
 ;;; Gnus Utility Functions
@@ -1259,54 +1643,53 @@ Optional argument HASHSIZE specifies the table size."
 
 (defun gnus-extract-address-components (from)
   (let (name address)
 
 (defun gnus-extract-address-components (from)
   (let (name address)
-    (if (string-match "([^)]+)" from)
-       (setq name (substring from (1+ (match-beginning 0)) 
-                             (1- (match-end 0)))))
-    (if (string-match "\\b[^@ \t<>]+@[^@ \t<>]+\\b" from)
+    (if (string-match "\\b[^@ \t<>]+[!@][^@ \t<>]+\\b" from)
        (setq address (substring from (match-beginning 0) (match-end 0))))
        (setq address (substring from (match-beginning 0) (match-end 0))))
-    (if (and (not name) address)
-       (if (string-match (concat "<" address ">") from)
-           (setq name (substring from 0 (1- (match-beginning 0))))))
+    (and address
+        (string-match (concat "<" (regexp-quote address) ">") from)
+        (setq name (substring from 0 (1- (match-beginning 0)))))
+    (or name
+       (and (string-match "(.+)" from)
+            (setq name (substring from (1+ (match-beginning 0)) 
+                                  (1- (match-end 0))))))
+    ;; Fix by Hallvard B Furuseth <h.b.furuseth@usit.uio.no>.
     (list (or name from) (or address from))))
 
 (defun gnus-fetch-field (field)
   "Return the value of the header FIELD of current article."
   (save-excursion
     (save-restriction
     (list (or name from) (or address from))))
 
 (defun gnus-fetch-field (field)
   "Return the value of the header FIELD of current article."
   (save-excursion
     (save-restriction
-      (gnus-narrow-to-headers)
-      (mail-fetch-field field))))
+      (let ((case-fold-search t))
+       (gnus-narrow-to-headers)
+       (mail-fetch-field field)))))
 
 (defun gnus-goto-colon ()
   (beginning-of-line)
 
 (defun gnus-goto-colon ()
   (beginning-of-line)
-  (search-forward ":" (save-excursion (end-of-line) (point)) t))
+  (search-forward ":" (gnus-point-at-eol) t))
 
 (defun gnus-narrow-to-headers ()
   (widen)
   (save-excursion
 
 (defun gnus-narrow-to-headers ()
   (widen)
   (save-excursion
-    (goto-char 1)
+    (goto-char (point-min))
     (if (search-forward "\n\n")
        (narrow-to-region 1 (1- (point))))))
 
     (if (search-forward "\n\n")
        (narrow-to-region 1 (1- (point))))))
 
-;; Get a number that is suitable for hashing; bigger than MIN
-(defun gnus-create-hash-size (min)
-  (let ((i 1))
-    (while (< i min)
-      (setq i (* 2 i)))
-    (1- i)))
-
 (defun gnus-update-format-specifications ()
 (defun gnus-update-format-specifications ()
+  (gnus-make-thread-indent-array)
   (setq gnus-summary-line-format-spec 
   (setq gnus-summary-line-format-spec 
-       (gnus-parse-format gnus-summary-line-format 
-                          gnus-summary-line-format-alist))
+       (gnus-parse-format
+        gnus-summary-line-format gnus-summary-line-format-alist))
+  (gnus-update-summary-mark-positions)
   (setq gnus-summary-dummy-line-format-spec 
        (gnus-parse-format gnus-summary-dummy-line-format 
                           gnus-summary-dummy-line-format-alist))
   (setq gnus-summary-dummy-line-format-spec 
        (gnus-parse-format gnus-summary-dummy-line-format 
                           gnus-summary-dummy-line-format-alist))
-  (if (and (memq 'newsgroup-description
-                (cdr (cdr (setq gnus-group-line-format-spec 
-                                (gnus-parse-format 
-                                 gnus-group-line-format 
-                                 gnus-group-line-format-alist)))))
-          (not gnus-description-hashtb))
+  (setq gnus-group-line-format-spec
+       (gnus-parse-format 
+        gnus-group-line-format 
+        gnus-group-line-format-alist))
+  (if (and (string-match "%D" gnus-group-line-format)
+          (not gnus-description-hashtb)
+          gnus-read-active-file)
       (gnus-read-descriptions-file))
   (setq gnus-summary-mode-line-format-spec 
        (gnus-parse-format gnus-summary-mode-line-format 
       (gnus-read-descriptions-file))
   (setq gnus-summary-mode-line-format-spec 
        (gnus-parse-format gnus-summary-mode-line-format 
@@ -1318,28 +1701,74 @@ Optional argument HASHSIZE specifies the table size."
        (gnus-parse-format gnus-group-mode-line-format 
                           gnus-group-mode-line-format-alist)))
 
        (gnus-parse-format gnus-group-mode-line-format 
                           gnus-group-mode-line-format-alist)))
 
-(defun gnus-format-max-width (var length)
-  (let (result)
-    (if (> (length (setq result (eval var))) length)
-       (format "%s" (substring result 0 length))
-      (format "%s" result))))
+(defun gnus-update-summary-mark-positions ()
+  (save-excursion
+    (let ((gnus-replied-mark 129)
+         (gnus-score-below-mark 130)
+         (gnus-score-over-mark 130)
+         (thread nil)
+         pos)
+      (gnus-set-work-buffer)
+      (gnus-summary-insert-line 
+       nil [0 "" "" "" "" "" 0 0 ""]  0 nil 128 t nil "" nil 1)
+      (goto-char (point-min))
+      (setq pos (list (cons 'unread (and (search-forward "\200" nil t)
+                                        (- (point) 2)))))
+      (goto-char (point-min))
+      (setq pos (cons (cons 'replied (and (search-forward "\201" nil t)
+                                         (- (point) 2))) pos))
+      (goto-char (point-min))
+      (setq pos (cons (cons 'score (and (search-forward "\202" nil t)
+                                       (- (point) 2))) pos))
+      (setq gnus-summary-mark-positions pos))))
+
+(defun gnus-format-max-width (form length)
+  (let* ((val (eval form))
+        (valstr (if (numberp val) (int-to-string val) val)))
+    (if (> (length valstr) length)
+       (substring valstr 0 length)
+      valstr)))
+
+(defun gnus-set-mouse-face (string)
+  ;; Set mouse face property on STRING.
+  (put-text-property 0 (length string) 'mouse-face gnus-mouse-face string)
+  string)
 
 (defun gnus-parse-format (format spec-alist)
 
 (defun gnus-parse-format (format spec-alist)
-;; This function parses the FORMAT string with the help of the
-;; SPEC-ALIST and returns a list that can be eval'ed to return the
-;; string. The list will consist of the symbol `format', a format
-;; specification string, and a list of forms depending on the
-;; SPEC-ALIST.
+  ;; This function parses the FORMAT string with the help of the
+  ;; SPEC-ALIST and returns a list that can be eval'ed to return the
+  ;; string.  If the FORMAT string contains the specifiers %( and %)
+  ;; the text between them will have the mouse-face text property.
+  (if (string-match "\\`\\(.*\\)%(\\(.*\\)%)\\(.*\n?\\)\\'" format)
+      (if (and gnus-visual gnus-mouse-face)
+         (let ((pre (substring format (match-beginning 1) (match-end 1)))
+               (button (substring format (match-beginning 2) (match-end 2)))
+               (post (substring format (match-beginning 3) (match-end 3))))
+           (list 'concat
+                 (gnus-parse-simple-format pre spec-alist)
+                 (list 'gnus-set-mouse-face
+                       (gnus-parse-simple-format button spec-alist))
+                 (gnus-parse-simple-format post spec-alist)))
+       (gnus-parse-simple-format
+        (concat (substring format (match-beginning 1) (match-end 1))
+                (substring format (match-beginning 2) (match-end 2))
+                (substring format (match-beginning 3) (match-end 3)))
+        spec-alist))
+    (gnus-parse-simple-format format spec-alist)))
+
+(defun gnus-parse-simple-format (format spec-alist)
+  ;; This function parses the FORMAT string with the help of the
+  ;; SPEC-ALIST and returns a list that can be eval'ed to return the
+  ;; string. The list will consist of the symbol `format', a format
+  ;; specification string, and a list of forms depending on the
+  ;; SPEC-ALIST.
   (let ((max-width 0)
        spec flist fstring b newspec max-width elem beg)
     (save-excursion
   (let ((max-width 0)
        spec flist fstring b newspec max-width elem beg)
     (save-excursion
-      (set-buffer (get-buffer-create "*gnus work*"))
-      (buffer-disable-undo (current-buffer))
-      (gnus-add-current-to-buffer-list)
-      (erase-buffer)
+      (gnus-set-work-buffer)
       (insert format)
       (insert format)
-      (goto-char 1)
-      (while (re-search-forward "%[-0-9]*\\(,[0-9]*\\)*\\(.\\)" nil t)
+      (goto-char (point-min))
+      (while (re-search-forward "%[-0-9]*\\(,[0-9]*\\)*\\(.\\)\\(.\\)?" nil t)
        (setq spec (string-to-char (buffer-substring (match-beginning 2)
                                                     (match-end 2))))
        ;; First check if there are any specs that look anything like
        (setq spec (string-to-char (buffer-substring (match-beginning 2)
                                                     (match-end 2))))
        ;; First check if there are any specs that look anything like
@@ -1354,10 +1783,25 @@ Optional argument HASHSIZE specifies the table size."
        ;; Find the specification from `spec-alist'.
        (if (not (setq elem (cdr (assq spec spec-alist))))
            (setq elem '("*" ?s)))
        ;; Find the specification from `spec-alist'.
        (if (not (setq elem (cdr (assq spec spec-alist))))
            (setq elem '("*" ?s)))
-       (if (not (= max-width 0))
-           (progn
-             (setq flist (cons (list 'gnus-format-max-width 
-                                     (car elem) max-width) flist))
+       ;; Treat user defined format specifiers specially
+       (and (eq (car elem) 'user-defined)
+            (setq elem
+                  (list 
+                   (list (intern (concat "gnus-user-format-function-"
+                                         (buffer-substring
+                                          (match-beginning 3)
+                                          (match-end 3))))
+                         'header)
+                   ?s))
+            (delete-region (match-beginning 3) (match-end 3)))
+       (if (not (zerop max-width))
+           (let ((el (car elem)))
+             (cond ((= (car (cdr elem)) ?c) 
+                    (setq el (list 'char-to-string el)))
+                   ((= (car (cdr elem)) ?d)
+                    (numberp el) (setq el (list 'int-to-string el))))
+             (setq flist (cons (list 'gnus-format-max-width el max-width) 
+                               flist))
              (setq newspec ?s))
          (setq flist (cons (car elem) flist))
          (setq newspec (car (cdr elem))))
              (setq newspec ?s))
          (setq flist (cons (car elem) flist))
          (setq newspec (car (cdr elem))))
@@ -1366,15 +1810,27 @@ Optional argument HASHSIZE specifies the table size."
        ;; Insert the new specification.
        (goto-char beg)
        (insert newspec))
        ;; Insert the new specification.
        (goto-char beg)
        (insert newspec))
-      (setq fstring (buffer-substring 1 (point-max)))
-      (kill-buffer (current-buffer)))
+      (setq fstring (buffer-substring 1 (point-max))))
     (cons 'format (cons fstring (nreverse flist)))))
 
 ;; Suggested by Brian Edmonds <edmonds@cs.ubc.ca>.
 (defun gnus-read-init-file ()
     (cons 'format (cons fstring (nreverse flist)))))
 
 ;; Suggested by Brian Edmonds <edmonds@cs.ubc.ca>.
 (defun gnus-read-init-file ()
-  (if (and gnus-init-file
-          (file-exists-p gnus-init-file))
-      (load gnus-init-file nil t)))
+  (and gnus-init-file
+       (or (and (file-exists-p gnus-init-file) 
+               ;; Don't try to load a directory.
+               (not (file-directory-p gnus-init-file)))
+          (file-exists-p (concat gnus-init-file ".el"))
+          (file-exists-p (concat gnus-init-file ".elc")))
+       (load gnus-init-file nil t)))
+
+(defun gnus-set-work-buffer ()
+  (if (get-buffer gnus-work-buffer)
+      (progn
+       (set-buffer gnus-work-buffer)
+       (erase-buffer))
+    (set-buffer (get-buffer-create gnus-work-buffer))
+    (buffer-disable-undo (current-buffer))
+    (gnus-add-current-to-buffer-list)))
 
 ;; Article file names when saving.
 
 
 ;; Article file names when saving.
 
@@ -1384,7 +1840,7 @@ If variable `gnus-use-long-file-name' is nil, it is ~/News/News.group/num.
 Otherwise, it is like ~/News/news/group/num."
   (let ((default
          (expand-file-name
 Otherwise, it is like ~/News/news/group/num."
   (let ((default
          (expand-file-name
-          (concat (if gnus-use-long-file-name
+          (concat (if (gnus-use-long-file-name 'not-save)
                       (gnus-capitalize-newsgroup newsgroup)
                     (gnus-newsgroup-directory-form newsgroup))
                   "/" (int-to-string (header-number headers)))
                       (gnus-capitalize-newsgroup newsgroup)
                     (gnus-newsgroup-directory-form newsgroup))
                   "/" (int-to-string (header-number headers)))
@@ -1402,7 +1858,7 @@ If variable `gnus-use-long-file-name' is nil, it is ~/News/news.group/num.
 Otherwise, it is like ~/News/news/group/num."
   (let ((default
          (expand-file-name
 Otherwise, it is like ~/News/news/group/num."
   (let ((default
          (expand-file-name
-          (concat (if gnus-use-long-file-name
+          (concat (if (gnus-use-long-file-name 'not-save)
                       newsgroup
                     (gnus-newsgroup-directory-form newsgroup))
                   "/" (int-to-string (header-number headers)))
                       newsgroup
                     (gnus-newsgroup-directory-form newsgroup))
                   "/" (int-to-string (header-number headers)))
@@ -1420,7 +1876,7 @@ If variable `gnus-use-long-file-name' is nil, it is ~/News/News.group.
 Otherwise, it is like ~/News/news/group/news."
   (or last-file
       (expand-file-name
 Otherwise, it is like ~/News/news/group/news."
   (or last-file
       (expand-file-name
-       (if gnus-use-long-file-name
+       (if (gnus-use-long-file-name 'not-save)
           (gnus-capitalize-newsgroup newsgroup)
         (concat (gnus-newsgroup-directory-form newsgroup) "/news"))
        (or gnus-article-save-directory "~/News"))))
           (gnus-capitalize-newsgroup newsgroup)
         (concat (gnus-newsgroup-directory-form newsgroup) "/news"))
        (or gnus-article-save-directory "~/News"))))
@@ -1431,7 +1887,7 @@ If variable `gnus-use-long-file-name' is nil, it is ~/News/news.group.
 Otherwise, it is like ~/News/news/group/news."
   (or last-file
       (expand-file-name
 Otherwise, it is like ~/News/news/group/news."
   (or last-file
       (expand-file-name
-       (if gnus-use-long-file-name
+       (if (gnus-use-long-file-name 'not-save)
           newsgroup
         (concat (gnus-newsgroup-directory-form newsgroup) "/news"))
        (or gnus-article-save-directory "~/News"))))
           newsgroup
         (concat (gnus-newsgroup-directory-form newsgroup) "/news"))
        (or gnus-article-save-directory "~/News"))))
@@ -1455,7 +1911,7 @@ Otherwise, it is like ~/News/news/group/news."
                 (string-match prefix (car (cdr groups))))
            (progn
              (setq prefixes (cons prefix prefixes))
                 (string-match prefix (car (cdr groups))))
            (progn
              (setq prefixes (cons prefix prefixes))
-             (message "Descend hierarchy %s'? ([y]nsq): " 
+             (message "Descend hierarchy %s? ([y]nsq): " 
                       (substring prefix 1 (1- (length prefix))))
              (setq ans (read-char))
              (cond ((= ans ?n)
                       (substring prefix 1 (1- (length prefix))))
              (setq ans (read-char))
              (cond ((= ans ?n)
@@ -1472,8 +1928,7 @@ Otherwise, it is like ~/News/news/group/news."
                                 (string-match prefix 
                                               (setq group (car groups))))
                       (gnus-sethash group group gnus-killed-hashtb)
                                 (string-match prefix 
                                               (setq group (car groups))))
                       (gnus-sethash group group gnus-killed-hashtb)
-                      (funcall gnus-subscribe-newsgroup-method 
-                               (car groups))
+                      (gnus-subscribe-alphabetically (car groups))
                       (setq groups (cdr groups)))
                     (setq starts (cdr starts)))
                    ((= ans ?q)
                       (setq groups (cdr groups)))
                     (setq starts (cdr starts)))
                    ((= ans ?q)
@@ -1483,10 +1938,11 @@ Otherwise, it is like ~/News/news/group/news."
                       (gnus-sethash group group gnus-killed-hashtb)
                       (setq groups (cdr groups))))
                    (t nil)))
                       (gnus-sethash group group gnus-killed-hashtb)
                       (setq groups (cdr groups))))
                    (t nil)))
-         (message "Subscribe '%s'? ([n]yq)" (car groups))
+         (message "Subscribe %s? ([n]yq)" (car groups))
          (setq ans (read-char))
          (setq ans (read-char))
+         (setq group (car groups))
          (cond ((= ans ?y)
          (cond ((= ans ?y)
-                (funcall gnus-subscribe-newsgroup-method (car groups))
+                (gnus-subscribe-alphabetically (car groups))
                 (gnus-sethash group group gnus-killed-hashtb))
                ((= ans ?q)
                 (while groups
                 (gnus-sethash group group gnus-killed-hashtb))
                ((= ans ?q)
                 (while groups
@@ -1506,7 +1962,7 @@ Otherwise, it is like ~/News/news/group/news."
 (defun gnus-subscribe-alphabetically (newgroup)
   "Subscribe new NEWSGROUP and insert it in alphabetical order."
   ;; Basic ideas by mike-w@cs.aukuni.ac.nz (Mike Williams)
 (defun gnus-subscribe-alphabetically (newgroup)
   "Subscribe new NEWSGROUP and insert it in alphabetical order."
   ;; Basic ideas by mike-w@cs.aukuni.ac.nz (Mike Williams)
-  (let ((groups (cdr gnus-newsrc-assoc))
+  (let ((groups (cdr gnus-newsrc-alist))
        before)
     (while (and (not before) groups)
       (if (string< newgroup (car (car groups)))
        before)
     (while (and (not before) groups)
       (if (string< newgroup (car (car groups)))
@@ -1540,7 +1996,7 @@ Otherwise, it is like ~/News/news/group/news."
   "Subscribe new NEWSGROUP interactively.
 It is inserted in hierarchical newsgroup order if subscribed. If not,
 it is killed."
   "Subscribe new NEWSGROUP interactively.
 It is inserted in hierarchical newsgroup order if subscribed. If not,
 it is killed."
-  (if (y-or-n-p (format "Subscribe new newsgroup: %s " newsgroup))
+  (if (gnus-y-or-n-p (format "Subscribe new newsgroup: %s " newsgroup))
       (gnus-subscribe-hierarchically newsgroup)
     (setq gnus-killed-list (cons newsgroup gnus-killed-list))))
 
       (gnus-subscribe-hierarchically newsgroup)
     (setq gnus-killed-list (cons newsgroup gnus-killed-list))))
 
@@ -1552,12 +2008,11 @@ it is killed."
   "Subscribe new NEWSGROUP.
 If NEXT is non-nil, it is inserted before NEXT. Otherwise it is made
 the first newsgroup."
   "Subscribe new NEWSGROUP.
 If NEXT is non-nil, it is inserted before NEXT. Otherwise it is made
 the first newsgroup."
-  ;; We subscribe the group by changing its level to 3.
+  ;; We subscribe the group by changing its level to `subscribed'.
   (gnus-group-change-level 
   (gnus-group-change-level 
-   newsgroup 3 9 
-   (if next (gnus-gethash next gnus-newsrc-hashtb)
-     (gnus-gethash (car (nth 1 gnus-newsrc-assoc)) gnus-newsrc-hashtb)))
-  (message "Subscribe newsgroup: %s" newsgroup))
+   newsgroup gnus-level-default-subscribed
+   gnus-level-killed (gnus-gethash (or next "dummy.group") gnus-newsrc-hashtb))
+  (gnus-message 5 "Subscribe newsgroup: %s" newsgroup))
 
 ;; For directories
 
 
 ;; For directories
 
@@ -1565,47 +2020,38 @@ the first newsgroup."
   "Make hierarchical directory name from NEWSGROUP name."
   (let ((newsgroup (substring newsgroup 0)) ;Copy string.
        (len (length newsgroup))
   "Make hierarchical directory name from NEWSGROUP name."
   (let ((newsgroup (substring newsgroup 0)) ;Copy string.
        (len (length newsgroup))
-       (idx 0))
+       idx)
+    ;; If this is a foreign group, we don't want to translate the
+    ;; entire name.  
+    (if (setq idx (string-match ":" newsgroup))
+       (aset newsgroup idx ?/)
+      (setq idx 0))
     ;; Replace all occurrences of `.' with `/'.
     (while (< idx len)
       (if (= (aref newsgroup idx) ?.)
          (aset newsgroup idx ?/))
       (setq idx (1+ idx)))
     ;; Replace all occurrences of `.' with `/'.
     (while (< idx len)
       (if (= (aref newsgroup idx) ?.)
          (aset newsgroup idx ?/))
       (setq idx (1+ idx)))
-    newsgroup
-    ))
+    newsgroup))
 
 
-(defun gnus-make-directory (directory)
+(defun gnus-make-directory (dir)
   "Make DIRECTORY recursively."
   "Make DIRECTORY recursively."
-  (let ((directory (expand-file-name directory default-directory)))
-    (or (file-exists-p directory)
-       (gnus-make-directory-1 "" directory))
-    ))
-
-(defun gnus-make-directory-1 (head tail)
-  (cond ((string-match "^/\\([^/]+\\)" tail)
-        ;; ange-ftp interferes with calling match-* after
-        ;; calling file-name-as-directory.
-        (let ((beg (match-beginning 1))
-              (end (match-end 1)))
-          (setq head (concat (file-name-as-directory head)
-                             (substring tail beg end)))
-          (or (file-exists-p head)
-              (call-process "mkdir" nil nil nil head))
-          (gnus-make-directory-1 head (substring tail end))))
-       ((string-equal tail "") t)
-       ))
+  (let* ((dir (expand-file-name dir default-directory))
+        dirs)
+    (if (string-match "/$" dir)
+       (setq dir (substring dir 0 (match-beginning 0))))
+    (while (not (file-exists-p dir))
+      (setq dirs (cons dir dirs))
+      (string-match "/[^/]+$" dir)
+      (setq dir (substring dir 0 (match-beginning 0))))
+    (while dirs
+      (make-directory (car dirs))
+      (setq dirs (cdr dirs)))))
 
 (defun gnus-capitalize-newsgroup (newsgroup)
 
 (defun gnus-capitalize-newsgroup (newsgroup)
-  "Capitalize NEWSGROUP name with treating '.' and '-' as part of words."
-  ;; Suggested by "Jonathan I. Kamens" <jik@pit-manager.MIT.EDU>.
-  (let ((current-syntax-table (syntax-table)))
-    (unwind-protect
-       (progn
-         (set-syntax-table (copy-syntax-table current-syntax-table))
-         (modify-syntax-entry ?- "w")
-         (modify-syntax-entry ?. "w")
-         (capitalize newsgroup))
-      (set-syntax-table current-syntax-table))))
+  "Capitalize NEWSGROUP name."
+  (and (not (zerop (length newsgroup)))
+       (concat (char-to-string (upcase (aref newsgroup 0)))
+              (substring newsgroup 1))))
 
 ;; Var
 
 
 ;; Var
 
@@ -1621,47 +2067,72 @@ If optional argument RE-ONLY is non-nil, strip `Re:' only."
        (while (string-match "[ \t\n]*([^()]*)[ \t\n]*\\'" subject)
          (setq subject (substring subject 0 (match-beginning 0)))))
     ;; Return subject string.
        (while (string-match "[ \t\n]*([^()]*)[ \t\n]*\\'" subject)
          (setq subject (substring subject 0 (match-beginning 0)))))
     ;; Return subject string.
-    subject
-    ))
+    subject))
+
+;; Remove any leading "re:"s, any trailing paren phrases, and simplify
+;; all whitespace.
+(defun gnus-simplify-subject-fuzzy (subject)
+  (let ((case-fold-search t))
+    (save-excursion
+      (gnus-set-work-buffer)
+      (insert subject)
+      (gnus-simplify-buffer-fuzzy)
+      (buffer-string))))
+
+(defun gnus-simplify-buffer-fuzzy ()
+  (goto-char (point-min))
+  (while (re-search-forward "^[ \t]*re:[ \t]*" nil t)
+    (replace-match "" t t))
+  (goto-char (point-min))
+  (while (re-search-forward "[ \t\n]*([^()]*)[ \t\n]*$" nil t)
+    (replace-match "" t t))
+  (goto-char (point-min))
+  (while (re-search-forward "[ \t]+" nil t)
+    (replace-match " " t t))
+  (goto-char (point-min))
+  (while (re-search-forward "[ \t]+$" nil t)
+    (replace-match "" t t))
+  (goto-char (point-min))
+  (while (re-search-forward "^[ \t]+" nil t)
+    (replace-match "" t t)))
 
 
+;; Add the current buffer to the list of buffers to be killed on exit. 
 (defun gnus-add-current-to-buffer-list ()
   (setq gnus-buffer-list (cons (current-buffer) gnus-buffer-list)))
 
 (defun gnus-add-current-to-buffer-list ()
   (setq gnus-buffer-list (cons (current-buffer) gnus-buffer-list)))
 
+(defun gnus-string> (s1 s2)
+  (not (or (string< s1 s2)
+          (string= s1 s2))))
+
 ;; Functions accessing headers.
 ;; Functions accessing headers.
-;; Functions are more convenient than macros in some case.
+;; Functions are more convenient than macros in some cases.
 
 (defun gnus-header-number (header)
 
 (defun gnus-header-number (header)
-  "Return article number in HEADER."
   (header-number header))
 
 (defun gnus-header-subject (header)
   (header-number header))
 
 (defun gnus-header-subject (header)
-  "Return subject string in HEADER."
   (header-subject header))
 
 (defun gnus-header-from (header)
   (header-subject header))
 
 (defun gnus-header-from (header)
-  "Return author string in HEADER."
   (header-from header))
 
 (defun gnus-header-xref (header)
   (header-from header))
 
 (defun gnus-header-xref (header)
-  "Return xref string in HEADER."
   (header-xref header))
 
 (defun gnus-header-lines (header)
   (header-xref header))
 
 (defun gnus-header-lines (header)
-  "Return lines in HEADER."
   (header-lines header))
 
 (defun gnus-header-date (header)
   (header-lines header))
 
 (defun gnus-header-date (header)
-  "Return date in HEADER."
   (header-date header))
 
 (defun gnus-header-id (header)
   (header-date header))
 
 (defun gnus-header-id (header)
-  "Return Id in HEADER."
   (header-id header))
 
 (defun gnus-header-references (header)
   (header-id header))
 
 (defun gnus-header-references (header)
-  "Return references in HEADER."
   (header-references header))
 
   (header-references header))
 
+;;; General various misc type functions.
+
 (defun gnus-clear-system ()
   "Clear all variables and buffers."
   ;; Clear Gnus variables.
 (defun gnus-clear-system ()
   "Clear all variables and buffers."
   ;; Clear Gnus variables.
@@ -1672,7 +2143,7 @@ If optional argument RE-ONLY is non-nil, strip `Re:' only."
   ;; Clear other internal variables.
   (setq gnus-list-of-killed-groups nil
        gnus-have-read-active-file nil
   ;; Clear other internal variables.
   (setq gnus-list-of-killed-groups nil
        gnus-have-read-active-file nil
-       gnus-newsrc-assoc nil
+       gnus-newsrc-alist nil
        gnus-newsrc-hashtb nil
        gnus-killed-list nil
        gnus-zombie-list nil
        gnus-newsrc-hashtb nil
        gnus-killed-list nil
        gnus-zombie-list nil
@@ -1682,120 +2153,181 @@ If optional argument RE-ONLY is non-nil, strip `Re:' only."
        gnus-description-hashtb nil
        gnus-newsgroup-headers nil
        gnus-newsgroup-headers-hashtb-by-number nil
        gnus-description-hashtb nil
        gnus-newsgroup-headers nil
        gnus-newsgroup-headers-hashtb-by-number nil
+       gnus-newsgroup-name nil
+       gnus-server-alist nil
   &n