#!/bin/sh
# this is part 2 of a multipart archive
# do not concatenate these parts, unpack them in order with /bin/sh
# file gnus.el continued
#
CurArch=2
if test ! -r s2_seq_.tmp
then echo "Please unpack part 1 first!"
     exit 1; fi
( read Scheck
  if test "$Scheck" != $CurArch
  then echo "Please unpack part $Scheck next!"
       exit 1;
  else exit 0; fi
) < s2_seq_.tmp || exit 1
sed 's/^X//' << 'SHAR_EOF' >> gnus.el
X  "*Show a summary of undigestified messages if non-nil.")
X
X(defvar gnus-digest-separator "^Subject:[ \t]"
X  "*Regexp that separates messages in a digest article.")
X
X(defvar gnus-use-full-window t
X  "*Non-nil means to take up the entire screen of Emacs.")
X
X(defvar gnus-window-configuration
X  '((SelectNewsgroup (0 1 0))
X    (ExitNewsgroup   (1 0 0))
X    (SelectArticle   (0 3 10))
X    (ExpandSubject   (0 1 0)))
X  "*Specify window configurations for each action.
XThe format of the variable is a list of (ACTION (G S A)), where
XG, S, and A are the relative height of Group, Subject, and Article
Xwindows, respectively.  ACTION is `SelectNewsgroup', `ExitNewsgroup',
X`SelectArticle', or `ExpandSubject'.")
X
X(defvar gnus-mail-reply-method
X  (function gnus-mail-reply-using-mail)
X  "*A function to compose reply mail.
XThe function gnus-mail-reply-using-mail uses usual sendmail mail
Xprogram.  The function gnus-mail-reply-using-mhe uses mh-e mail
Xprogram.  You can use yet another program by customizing this variable.")
X
X(defvar gnus-mail-other-window-method
X  (function gnus-mail-other-window-using-mail)
X  "*A function to compose mail in other window.
XThe function gnus-mail-other-window-using-mail uses usual sendmail
Xmail program.  The function gnus-mail-other-window-using-mhe uses mh-e
Xmail program.  You can use yet another program by customizing this variable.")
X
X(defvar gnus-subscribe-newsgroup-method
X  (function
X   (lambda (newsgroup)
X     (gnus-subscribe-newsgroup newsgroup
X			       (car (car gnus-newsrc-assoc)))))
X  "*A function called with a newsgroup name when new newsgroup is found.")
X
X(defvar gnus-Group-mode-hook nil
X  "*A hook for GNUS Group Mode.")
X
X(defvar gnus-Subject-mode-hook nil
X  "*A hook for GNUS Subject Mode.")
X
X(defvar gnus-Article-mode-hook nil
X  "*A hook for GNUS Article Mode.")
X
X(defvar gnus-Kill-file-mode-hook nil
X  "*A hook for GNUS KILL File Mode.")
X
X(defvar gnus-Open-server-hook nil
X  "*A hook called just before opening connection to news server.")
X
X(defvar gnus-Startup-hook nil
X  "*A hook called at start up time.
XThis hook is called after GNUS is connected to the NNTP server. So, it
Xis possible to change the behavior of GNUS according to the selected
XNNTP server.")
X
X(defvar gnus-Group-prepare-hook nil
X  "*A hook called after newsgroup list is created in the Newsgroup buffer.
XIf you want to modify the Newsgroup buffer, you can use this hook.")
X
X(defvar gnus-Subject-prepare-hook nil
X  "*A hook called after subject list is created in the Subject buffer.
XIf you want to modify the Subject buffer, you can use this hook.")
X
X(defvar gnus-Article-prepare-hook nil
X  "*A hook called after an article is prepared in the Article buffer.
XIf you want to run a special decoding program like nkf, use this hook.")
X
X(defvar gnus-Select-group-hook nil
X  "*A hook called when a newsgroup is selected.
XIf you want to sort Subject buffer by date and then by subject, you
Xcan use the following hook:
X
X(setq gnus-Select-group-hook
X      '(lambda ()
X	 ;; First of all, sort by date.
X	 (gnus-sort-headers
X	  '(lambda (a b)
X	     (gnus-date-lessp (gnus-header-date a)
X			      (gnus-header-date b))))
X	 ;; Then sort by subject string ignoring `Re:'.
X	 ;; If case-fold-search is non-nil, case of letters is ignored.
X	 (gnus-sort-headers
X	  '(lambda (a b)
X	     (gnus-string-lessp
X	      (gnus-simplify-subject (gnus-header-subject a) 're)
X	      (gnus-simplify-subject (gnus-header-subject b) 're)
X	      )))))
X
XIf you'd like to simplify subjects like the
X`gnus-Subject-next-same-subject' command does, you can use the
Xfollowing hook:
X
X(setq gnus-Select-group-hook
X      '(lambda ()
X	 (mapcar (function
X		  (lambda (header)
X		    (nntp-set-header-subject
X		     header
X		     (gnus-simplify-subject
X		      (gnus-header-subject header) 're-only))))
X		 gnus-newsgroup-headers)))
X
XIn some newsgroups author name is meaningless. It is possible to
Xprevent listing author names in GNUS Subject buffer as follows:
X
X(setq gnus-Select-group-hook
X      '(lambda ()
X	 (cond ((string-equal \"comp.sources.unix\" gnus-newsgroup-name)
X		(setq gnus-optional-headers
X		      (function gnus-optional-lines)))
X	       (t
X		(setq gnus-optional-headers
X		      (function gnus-optional-lines-and-from))))))")
X
X(defvar gnus-Select-article-hook
X  (function (lambda () (gnus-Subject-show-thread)))
X  "*A hook called when an article is selected.
XThe default hook shows conversation thread subtrees of the selected
Xarticle automatically as follows:
X
X(setq gnus-Select-article-hook
X      '(lambda ()
X	 (gnus-Subject-show-thread)))
X
XIf you'd like to run RMAIL on a digest article automagically, you can
Xuse the following hook:
X
X(setq gnus-Select-article-hook
X      '(lambda ()
X	 (gnus-Subject-show-thread)
X	 (cond ((string-equal \"comp.sys.sun\" gnus-newsgroup-name)
X		(gnus-Subject-rmail-digest))
X	       ((and (string-equal \"comp.text\" gnus-newsgroup-name)
X		     (string-match \"^TeXhax Digest\"
X				   (gnus-header-subject gnus-current-headers)))
X		(gnus-Subject-rmail-digest)
X		))))")
X
X(defvar gnus-Select-digest-hook
X  (function
X   (lambda ()
X     ;; Reply-To: is required by `undigestify-rmail-message'.
X     (or (mail-position-on-field "Reply-to" t)
X	 (progn
X	   (mail-position-on-field "Reply-to")
X	   (insert (gnus-fetch-field "From"))))))
X  "*A hook called when reading digest messages using Rmail.
XThis hook can be used to modify incomplete digest articles as follows
X(this is the default):
X
X(setq gnus-Select-digest-hook
X      '(lambda ()
X	 ;; Reply-To: is required by `undigestify-rmail-message'.
X	 (or (mail-position-on-field \"Reply-to\" t)
X	     (progn
X	       (mail-position-on-field \"Reply-to\")
X	       (insert (gnus-fetch-field \"From\"))))))")
X
X(defvar gnus-Rmail-digest-hook nil
X  "*A hook called when reading digest messages using Rmail.
XThis hook is intended to customize Rmail mode for reading digest articles.")
X
X(defvar gnus-Apply-kill-hook (function gnus-apply-kill-file)
X  "*A hook called when a newsgroup is selected and subject list is prepared.
XThis hook is intended to apply a KILL file to the selected newsgroup.
XThe function `gnus-apply-kill-file' is called defaultly.
X
XSince a general KILL file is too heavy to use only for a few
Xnewsgroups, I recommend you to use a lighter hook function. For
Xexample, if you'd like to apply a KILL file to articles which contains
Xa string `rmgroup' in subject in newsgroup `control', you can use the
Xfollowing hook:
X
X(setq gnus-Apply-kill-hook
X      '(lambda ()
X	 (cond ((string-match \"control\" gnus-newsgroup-name)
X		(gnus-kill \"Subject\" \"rmgroup\")
X		(gnus-expunge \"X\")))))")
X
X(defvar gnus-Mark-article-hook
X  (function
X   (lambda ()
X     (or (memq gnus-current-article gnus-newsgroup-marked)
X	 (gnus-Subject-mark-as-read gnus-current-article))
X     (gnus-Subject-set-current-mark "+")))
X  "*A hook called when an article is selected at the first time.
XThe hook is intended to mark an article as read (or unread)
Xautomatically when it is selected.
X
XIf you'd like to mark as unread (-) instead, use the following hook:
X
X(setq gnus-Mark-article-hook
X      '(lambda ()
X	 (gnus-Subject-mark-as-unread gnus-current-article)
X	 (gnus-Subject-set-current-mark \"+\")))")
X
X(defvar gnus-Inews-article-hook nil
X  "*A hook called before posting an article.
XIf you'd like to run a special encoding program, use this hook.")
X
X(defvar gnus-Exit-group-hook nil
X  "*A hook called when exiting (not quitting) Subject mode.
XIf your machine is so slow that exiting from Subject mode takes very
Xlong time, set the variable gnus-newsgroup-headers to nil. This
Xinhibits marking articles as read using cross-reference information.")
X
X(defvar gnus-Suspend-gnus-hook nil
X  "*A hook called when suspending (not exiting) GNUS.")
X
X(defvar gnus-Exit-gnus-hook nil
X  "*A hook called when exiting (not suspending) GNUS.")
X
X(defvar gnus-Save-newsrc-hook nil
X  "*A hook called when saving the newsrc file.
XThis hook is called before saving .newsrc file.")
X
X;; Site dependent variables. You have to define these variables in
X;;  site-init.el, default.el or your .emacs.
X
X(defvar gnus-your-domain nil
X  "*Your domain name without your host name like: \"stars.flab.Fujitsu.CO.JP\"
XThe `DOMAINNAME' environment variable is used instead if defined.  If
Xthe function (system-name) returns the full internet name, there is no
Xneed to define the name.")
X
X(defvar gnus-your-organization nil
X  "*Your organization like: \"Fujitsu Laboratories Ltd., Kawasaki, Japan.\"
XThe `ORGANIZATION' environment variable is used instead if defined.")
X
X(defvar gnus-use-generic-from nil
X  "*If nil, prepend local host name to the defined domain in the From:
Xfield; if stringp, use this; if non-nil, strip of the local host name.")
X
X(defvar gnus-use-generic-path nil
X  "*If nil, use the NNTP server name in the Path: field; if stringp,
Xuse this; if non-nil, use no host name (user name only)")
X
X(defvar gnus-Info-directory Info-directory
X  "*A directory placing an Info file of GNUS.")
X
X
X;; Internal variables.
X
X(defconst gnus-version "GNUS 3.13"
X  "Version numbers of this version of GNUS.")
X
X(defvar gnus-Info-nodes
X  '((gnus-Group-mode . "(gnus)Newsgroup Commands")
X    (gnus-Subject-mode . "(gnus)Subject Commands")
X    (gnus-Article-mode . "(gnus)Article Commands")
X    (gnus-Kill-file-mode . "(gnus)KILL File")
X    (gnus-Browse-killed-mode . "(gnus)Maintenance"))
X  "Assoc list of major modes and related Info nodes.")
X
X(defvar gnus-access-methods
X  '((nntp
X     (gnus-retrieve-headers .	nntp-retrieve-headers)
X     (gnus-open-server .	nntp-open-server)
X     (gnus-close-server .	nntp-close-server)
X     (gnus-server-opened .	nntp-server-opened)
X     (gnus-status-message .	nntp-status-message)
X     (gnus-request-article .	nntp-request-article)
X     (gnus-request-group .	nntp-request-group)
X     (gnus-request-list .	nntp-request-list)
X     (gnus-request-post .	nntp-request-post))
X    (nnspool
X     (gnus-retrieve-headers .	nnspool-retrieve-headers)
X     (gnus-open-server .	nnspool-open-server)
X     (gnus-close-server .	nnspool-close-server)
X     (gnus-server-opened .	nnspool-server-opened)
X     (gnus-status-message .	nnspool-status-message)
X     (gnus-request-article .	nnspool-request-article)
X     (gnus-request-group .	nnspool-request-group)
X     (gnus-request-list .	nnspool-request-list)
X     (gnus-request-post .	nnspool-request-post))
X    (mhspool
X     (gnus-retrieve-headers .	mhspool-retrieve-headers)
X     (gnus-open-server .	mhspool-open-server)
X     (gnus-close-server .	mhspool-close-server)
X     (gnus-server-opened .	mhspool-server-opened)
X     (gnus-status-message .	mhspool-status-message)
X     (gnus-request-article .	mhspool-request-article)
X     (gnus-request-group .	mhspool-request-group)
X     (gnus-request-list .	mhspool-request-list)
X     (gnus-request-post .	mhspool-request-post)))
X  "Access method for NNTP, nnspool, and mhspool.")
X
X(defvar gnus-Group-buffer "*Newsgroup*")
X(defvar gnus-Subject-buffer "*Subject*")
X(defvar gnus-Article-buffer "*Article*")
X(defvar gnus-Digest-buffer "GNUS Digest")
X(defvar gnus-Digest-summary-buffer "GNUS Digest-summary")
X
X(defvar gnus-buffer-list
X  (list gnus-Group-buffer gnus-Subject-buffer gnus-Article-buffer
X	gnus-Digest-buffer gnus-Digest-summary-buffer)
X  "GNUS buffer names which should be killed when exiting.")
X
X(defvar gnus-variable-list
X  '(gnus-newsrc-options
X    gnus-newsrc-options-n-yes gnus-newsrc-options-n-no
X    gnus-newsrc-assoc gnus-killed-assoc gnus-marked-assoc)
X  "GNUS variables saved in the quick startup file.")
X
X(defvar gnus-overload-functions
X  '((news-inews gnus-inews-news "rnewspost")
X    (caesar-region gnus-caesar-region "rnews"))
X  "Functions overloaded by gnus.
XIt is a list of `(original overload &optional file)'.")
X
X(defvar gnus-newsrc-options nil
X  "Options line in the .newsrc file.")
X
X(defvar gnus-newsrc-options-n-yes nil
X  "Regexp representing subscribed newsgroups.")
X
X(defvar gnus-newsrc-options-n-no nil
X  "Regexp representing unsubscribed newsgroups.")
X
X(defvar gnus-newsrc-assoc nil
X  "Assoc list of read articles.")
X
X(defvar gnus-killed-assoc nil
X  "Assoc list of newsgroups removed from gnus-newsrc-assoc.")
X
X(defvar gnus-marked-assoc nil
X  "Assoc list of articles marked as unread.")
X
X(defvar gnus-unread-hashtb nil
X  "Hashtable of unread articles.")
X
X(defvar gnus-active-hashtb nil
X  "Hashtable of active articles.")
X
X(defvar gnus-octive-hashtb nil
X  "Hashtable of OLD active articles.")
X
X(defvar gnus-current-startup-file nil
X  "Startup file for the current host.")
X
X(defvar gnus-last-search-regexp nil
X  "Default regexp for article search command.")
X
X(defvar gnus-last-shell-command nil
X  "Default shell command on article.")
X
X(defvar gnus-have-all-newsgroups nil)
X
X(defvar gnus-newsgroup-name nil)
X(defvar gnus-newsgroup-begin nil)
X(defvar gnus-newsgroup-end nil)
X(defvar gnus-newsgroup-last-rmail nil)
X(defvar gnus-newsgroup-last-mail nil)
X(defvar gnus-newsgroup-last-folder nil)
X(defvar gnus-newsgroup-last-file nil)
X
X(defvar gnus-newsgroup-unreads nil
X  "List of unread articles in the current newsgroup.")
X
X(defvar gnus-newsgroup-unselected nil
X  "List of unselected unread articles in the current newsgroup.")
X
X(defvar gnus-newsgroup-marked nil
X  "List of marked articles in the current newsgroup (a subset of unread art).")
X
X(defvar gnus-newsgroup-headers nil
X  "List of article headers in the current newsgroup.")
X
X(defvar gnus-current-article nil)
X(defvar gnus-current-headers nil)
X(defvar gnus-current-history nil)
X(defvar gnus-have-all-headers nil)
X(defvar gnus-last-article nil)
X(defvar gnus-current-kill-article nil)
X
X;; Save window configuration.
X(defvar gnus-winconf-kill-file nil)
X
X(defvar gnus-Group-mode-map nil)
X(defvar gnus-Subject-mode-map nil)
X(defvar gnus-Article-mode-map nil)
X(defvar gnus-Kill-file-mode-map nil)
X
X(defvar rmail-last-file (expand-file-name "~/XMBOX"))
X(defvar rmail-last-rmail-file (expand-file-name "~/XNEWS"))
X
X;; Define GNUS Subsystems.
X(autoload 'gnus-Group-post-news "gnuspost"
X	  "Post an article." t)
X(autoload 'gnus-Subject-post-news "gnuspost"
X	  "Post an article." t)
X(autoload 'gnus-Subject-post-reply "gnuspost"
X	  "Post a reply article." t)
X(autoload 'gnus-Subject-post-reply-with-original "gnuspost"
X	  "Post a reply article with original article." t)
X(autoload 'gnus-Subject-cancel-article "gnuspost"
X	  "Cancel an article you posted." t)
X
X(autoload 'gnus-Subject-mail-reply "gnusmail"
X	  "Reply mail to news author." t)
X(autoload 'gnus-Subject-mail-reply-with-original "gnusmail"
X	  "Reply mail to news author with original article." t)
X(autoload 'gnus-Subject-mail-other-window "gnusmail"
X	  "Compose mail in other window." t)
X
X(autoload 'gnus-Group-kill-group "gnusmisc"
X	  "Kill newsgroup on current line." t)
X(autoload 'gnus-Group-yank-group "gnusmisc"
X	  "Yank the last killed newsgroup on current line." t)
X(autoload 'gnus-Browse-killed-groups "gnusmisc"
X	  "Browse the killed newsgroups." t)
X
X(autoload 'rmail-output "rmailout"
X	  "Append this message to Unix mail file named FILE-NAME." t)
X(autoload 'mail-position-on-field "sendmail")
X(autoload 'mh-find-path "mh-e")
X(autoload 'mh-prompt-for-folder "mh-e")
X
X(put 'gnus-Group-mode 'mode-class 'special)
X(put 'gnus-Subject-mode 'mode-class 'special)
X(put 'gnus-Article-mode 'mode-class 'special)
X
X
X;;(put 'gnus-eval-in-buffer-window 'lisp-indent-hook 1)
X
X(defmacro gnus-eval-in-buffer-window (buffer &rest forms)
X  "Pop to BUFFER, evaluate FORMS, and then returns to original window."
X  (` (let ((GNUSStartBufferWindow (selected-window)))
X       (unwind-protect
X	   (progn
X	     (pop-to-buffer (, buffer))
X	     (,@ forms))
X	 (select-window GNUSStartBufferWindow)))))
X
X(defmacro gnus-make-hashtable ()
X  '(make-abbrev-table))
X
X(defmacro gnus-gethash (string hashtable)
X  "Get hash value of STRING in HASHTABLE."
X  ;;(` (symbol-value (abbrev-symbol (, string) (, hashtable))))
X  (` (abbrev-expansion (, string) (, hashtable))))
X
X(defmacro gnus-sethash (string value hashtable)
X  "Set hash value. Arguments are STRING, VALUE, and HASHTABLE."
X  ;; We cannot use define-abbrev since it only accepts string as value.
X  (` (set (intern (, string) (, hashtable)) (, value))))
X
X;; Note: Macros defined here are also defined in nntp.el. I don't like
X;; to put them here, but many users got troubled with the old
X;; definitions in nntp.elc. These codes are NNTP 3.10 version.
X
X(defmacro nntp-header-number (header)
X  "Return article number in HEADER."
X  (` (aref (, header) 0)))
X
X(defmacro nntp-set-header-number (header number)
X  "Set article number of HEADER to NUMBER."
X  (` (aset (, header) 0 (, number))))
X
X(defmacro nntp-header-subject (header)
X  "Return subject string in HEADER."
X  (` (aref (, header) 1)))
X
X(defmacro nntp-set-header-subject (header subject)
X  "Set article subject of HEADER to SUBJECT."
X  (` (aset (, header) 1 (, subject))))
X
X(defmacro nntp-header-from (header)
X  "Return author string in HEADER."
X  (` (aref (, header) 2)))
X
X(defmacro nntp-set-header-from (header from)
X  "Set article author of HEADER to FROM."
X  (` (aset (, header) 2 (, from))))
X
X(defmacro nntp-header-xref (header)
X  "Return xref string in HEADER."
X  (` (aref (, header) 3)))
X
X(defmacro nntp-set-header-xref (header xref)
X  "Set article xref of HEADER to xref."
X  (` (aset (, header) 3 (, xref))))
X
X(defmacro nntp-header-lines (header)
X  "Return lines in HEADER."
X  (` (aref (, header) 4)))
X
X(defmacro nntp-set-header-lines (header lines)
X  "Set article lines of HEADER to LINES."
X  (` (aset (, header) 4 (, lines))))
X
X(defmacro nntp-header-date (header)
X  "Return date in HEADER."
X  (` (aref (, header) 5)))
X
X(defmacro nntp-set-header-date (header date)
X  "Set article date of HEADER to DATE."
X  (` (aset (, header) 5 (, date))))
X
X(defmacro nntp-header-id (header)
X  "Return Id in HEADER."
X  (` (aref (, header) 6)))
X
X(defmacro nntp-set-header-id (header id)
X  "Set article Id of HEADER to ID."
X  (` (aset (, header) 6 (, id))))
X
X(defmacro nntp-header-references (header)
X  "Return references in HEADER."
X  (` (aref (, header) 7)))
X
X(defmacro nntp-set-header-references (header ref)
X  "Set article references of HEADER to REF."
X  (` (aset (, header) 7 (, ref))))
X
X
X;;;
X;;; GNUS Group Mode
X;;;
X
X(if gnus-Group-mode-map
X    nil
X  (setq gnus-Group-mode-map (make-keymap))
X  (suppress-keymap gnus-Group-mode-map)
X  (define-key gnus-Group-mode-map " " 'gnus-Group-read-group)
X  (define-key gnus-Group-mode-map "=" 'gnus-Group-select-group)
X  (define-key gnus-Group-mode-map "j" 'gnus-Group-jump-to-group)
X  (define-key gnus-Group-mode-map "n" 'gnus-Group-next-unread-group)
X  (define-key gnus-Group-mode-map "p" 'gnus-Group-prev-unread-group)
X  (define-key gnus-Group-mode-map "\177" 'gnus-Group-prev-unread-group)
X  (define-key gnus-Group-mode-map "N" 'gnus-Group-next-group)
X  (define-key gnus-Group-mode-map "P" 'gnus-Group-prev-group)
X  (define-key gnus-Group-mode-map "\C-n" 'gnus-Group-next-group)
X  (define-key gnus-Group-mode-map "\C-p" 'gnus-Group-prev-group)
X  (define-key gnus-Group-mode-map "\r" 'next-line)
X  (define-key gnus-Group-mode-map "/" 'isearch-forward)
X  (define-key gnus-Group-mode-map "<" 'beginning-of-buffer)
X  (define-key gnus-Group-mode-map ">" 'end-of-buffer)
X  (define-key gnus-Group-mode-map "u" 'gnus-Group-unsubscribe-current-group)
X  (define-key gnus-Group-mode-map "U" 'gnus-Group-unsubscribe-group)
X  (define-key gnus-Group-mode-map "c" 'gnus-Group-catch-up)
X  (define-key gnus-Group-mode-map "C" 'gnus-Group-catch-up-all)
X  (define-key gnus-Group-mode-map "l" 'gnus-Group-list-groups)
X  (define-key gnus-Group-mode-map "L" 'gnus-Group-list-all-groups)
X  (define-key gnus-Group-mode-map "g" 'gnus-Group-get-new-news)
X  (define-key gnus-Group-mode-map "R" 'gnus-Group-restart)
X  (define-key gnus-Group-mode-map "b" 'gnus-Group-check-bogus-groups)
X  (define-key gnus-Group-mode-map "r" 'gnus-Group-restrict-groups)
X  (define-key gnus-Group-mode-map "a" 'gnus-Group-post-news)
X  (define-key gnus-Group-mode-map "\ek" 'gnus-Group-edit-local-kill)
X  (define-key gnus-Group-mode-map "\eK" 'gnus-Group-edit-global-kill)
X  (define-key gnus-Group-mode-map "\C-k" 'gnus-Group-kill-group)
X  (define-key gnus-Group-mode-map "\C-y" 'gnus-Group-yank-group)
X  (define-key gnus-Group-mode-map "\C-c\C-y" 'gnus-Browse-killed-groups)
X  (define-key gnus-Group-mode-map "V" 'gnus-version)
X  (define-key gnus-Group-mode-map "x" 'gnus-Group-force-update)
X  (define-key gnus-Group-mode-map "s" 'gnus-Group-force-update)
X  (define-key gnus-Group-mode-map "z" 'gnus-Group-suspend)
X  (define-key gnus-Group-mode-map "q" 'gnus-Group-exit)
X  (define-key gnus-Group-mode-map "Q" 'gnus-Group-quit)
X  (define-key gnus-Group-mode-map "?" 'gnus-Group-describe-briefly)
X  (define-key gnus-Group-mode-map "\C-c\C-i" 'gnus-Info-find-node))
X
X(defun gnus-Group-mode ()
X  "Major mode for reading network news.
XAll normal editing commands are turned off.
XInstead, these commands are available:
X
XSPC	Read articles in this newsgroup.
X=	Select this newsgroup.
Xj	Move to the specified newsgroup.
Xn	Move to the next unread newsgroup.
Xp	Move to the previous unread newsgroup.
XC-n	Move to the next newsgroup.
XC-p	Move to the previous newsgroup.
X/	Do an incremental search forward.
X<	Move point to the beginning of this buffer.
X>	Move point to the end of this buffer.
Xu	Unsubscribe from (subscribe to) this newsgroup.
XU	Unsubscribe from (subscribe to) the specified newsgroup.
Xc	Mark all articles as read, preserving marked articles.
XC	Mark all articles in this newsgroup as read.
Xl	Revert this buffer.
XL	List all newsgroups.
Xg	Get new news.
XR	Force to read the raw .newsrc file and get new news.
Xb	Check bogus newsgroups.
Xr	Restrict visible newsgroups to the current region.
Xa	Post a new article.
XESC k	Edit a local KILL file applied to this newsgroup.
XESC K	Edit a global KILL file applied to all newsgroups.
XC-k	Kill this newsgroup.
XC-y	Yank killed newsgroup here.
XC-c C-y	Browse killed newsgroups.
Xs	Save .newsrc file.
Xz	Suspend reading news.
Xq	Quit reading news.
XQ	Quit reading news without saving .newsrc file.
XV	Show the version number of this GNUS.
X?	Describe Group Mode commands briefly.
XC-h m	Describe Group Mode.
XC-c C-i	Read Info about Group Mode.
X
X  The name of the host running NNTP server is asked for if no default
Xhost is specified. It is also possible to choose another NNTP server
Xeven when the default server is defined by giving a prefix argument to
Xthe command `\\[gnus]'.
X
X  If an NNTP server is preceded by a colon such as `:Mail', the user's
Xprivate directory `~/Mail' is used as a news spool. This makes it
Xpossible to read mail stored in MH folders or articles saved by GNUS.
XFile names of mail or articles must consist of only numeric
Xcharacters. Otherwise, they are ignored.
X
X  If there is a file named `~/.newsrc-SERVER', it is used as the
Xstartup file instead of standard one when talking to SERVER.  It is
Xpossible to talk to many hosts by using different startup files for
Xeach.
X
X  Option `-n' of the options line in the startup file is recognized
Xproperly the same as the Bnews system. For example, if the options
Xline is `options -n !talk talk.rumors', newsgroups under the `talk'
Xhierarchy except for `talk.rumors' are ignored while checking new
Xnewsgroups.
X
X  If there is a file named `~/.signature-DISTRIBUTION', it is used as
Xsignature file instead of standard one when posting a news in
XDISTRIBUTION.
X
X  If an Info file generated from `gnus.texinfo' is installed, you can
Xread an appropriate Info node of the Info file according to the
Xcurrent major mode of GNUS by \\[gnus-Info-find-node].
X
X  The variable `gnus-version', `nntp-version', `nnspool-version', and
X`mhspool-version' have the version numbers of this version of gnus.el,
Xnntp.el, nnspool.el, and mhspoo.el, respectively.
X
XUser customizable variables:
X gnus-nntp-server
X    Specifies the name of the host running the NNTP server. If its
X    value is a string such as `:DIRECTORY', the user's private
X    DIRECTORY is used as a news spool. The variable is initialized
X    from the NNTPSERVER environment variable.
X
X gnus-nntp-service
X    Specifies a NNTP service name. It is usually \"nntp\" or 119.  Nil
X    forces GNUS to use a local news spool if the variable
X    `gnus-nntp-server' is set to the local host name.
X
X gnus-startup-file
X    Specifies a startup file (.newsrc). If there is a file named
X    `.newsrc-SERVER', it's used instead when talking to SERVER. I
X    recommend you to use the server specific file, if you'd like to
X    talk to many servers.  Especially if you'd like to read your
X    private directory, the name of the file must be
X    `.newsrc-:DIRECTORY'.
X
X gnus-signature-file
X    Specifies a signature file (.signature). If there is a file named
X    `.signature-DISTRIBUTION', it's used instead when posting an
X    article in DISTRIBUTION. Set the variable to nil to prevent
X    appending the file automatically. If you use an NNTP inews which
X    comes with the NNTP package, you may have to set the variable to
X    nil.
X
X gnus-use-cross-reference
X    Specifies what to do with cross references (Xref: field).  If it
X    is nil, cross references are ignored.  If it is t, articles in
X    subscribed newsgroups are only marked as read.  Otherwise, if it
X    is not nil nor t, articles in all newsgroups are marked as read.
X
X gnus-use-followup-to
X    Specifies what to do with followup-to: field.  If it is nil, its
X    value is ignored.  If it is non-nil, its value is used as followup
X    newsgroups.  Especially, if it is t and field value is `poster',
X    your confirmation is required.
X
X gnus-author-copy
X    Specifies a file name to save a copy of article you posted using
X    FCC: field.  If the first character of the value is `|', the
X    contents of the article is piped out to a program specified by the
X    rest of the value.  The variable is initialized from the
X    AUTHORCOPY environment variable.
X
X gnus-author-copy-saver
X    Specifies a function to save an author copy.  The function is
X    called with a file name.  The default function `rmail-output'
X    saves in Unix mail format.
X
X gnus-kill-file-name
X    Use specified file name as a KILL file (default to `KILL').
X
X gnus-novice-user
X    Non-nil means that you are a novice to USENET.  If non-nil,
X    verbose messages may be displayed or your confirmations may be
X    required.
X
X gnus-interactive-post
X    Non-nil means that newsgroup, subject and distribution are asked
X    for interactively when posting a new article.
X
X gnus-use-full-window
X    Non-nil means to take up the entire screen of Emacs.
X
X gnus-window-configuration
X    Specifies the configuration of Group, Subject, and Article
X    windows.  It is a list of (ACTION (G S A)), where G, S, and A are
X    the relative height of Group, Subject, and Article windows,
X    respectively.  ACTION is `SelectNewsgroup', `ExitNewsgroup',
X    `SelectArticle', or `ExpandSubject'.
X
X gnus-subscribe-newsgroup-method
X    Specifies a function called with a newsgroup name when new
X    newsgroup is found.  The default definition adds new newsgroup at
X    the beginning of other newsgroups.
X
XVarious hooks for customization:
X gnus-Group-mode-hook
X    Entry to this mode calls the value with no arguments, if that
X    value is non-nil. This hook is called before GNUS is connected to
X    the NNTP server. So, you can change or define the NNTP server in
X    this hook.
X
X gnus-Startup-hook
X    Called with no arguments after the NNTP server is selected. It is
X    possible to change the behavior of GNUS or initialize the
X    variables according to the selected NNTP server.
X
X gnus-Group-prepare-hook
X    Called with no arguments after a newsgroup list is created in the
X    Newsgroup buffer, if that value is non-nil.
X
X gnus-Save-newsrc-hook
X    Called with no arguments when saving newsrc file if that value is
X    non-nil.
X
X gnus-Inews-article-hook
X    Called with no arguments when posting an article if that value is
X    non-nil. This hook is called just before posting an article, while
X    news-inews-hook is called before preparing article headers. If
X    you'd like to convert kanji code of the article, this hook is recommended.
X
X gnus-Suspend-gnus-hook
X    Called with no arguments when suspending (not exiting) GNUS, if
X    that value is non-nil.
X
X gnus-Exit-gnus-hook
X    Called with no arguments when exiting (not suspending) GNUS, if
X    that value is non-nil."
X  (interactive)
X  (kill-all-local-variables)
X  ;; Gee.  Why don't you upgrade?
X  (cond ((boundp 'mode-line-modified)
X	 (setq mode-line-modified "--- "))
X	((listp (default-value 'mode-line-format))
X	 (setq mode-line-format
X	       (cons "--- " (cdr (default-value 'mode-line-format)))))
X	(t
X	 (setq mode-line-format
X	       "--- GNUS: List of Newsgroups  %[(%m)%]----%3p-%-")))
X  (setq major-mode 'gnus-Group-mode)
X  (setq mode-name "Newsgroup")
X  (setq mode-line-buffer-identification	"GNUS: List of Newsgroups")
X  (setq mode-line-process nil)
X  (use-local-map gnus-Group-mode-map)
X  (buffer-flush-undo (current-buffer))
X  (setq buffer-read-only t)		;Disable modification
X  (run-hooks 'gnus-Group-mode-hook))
X
X(defun gnus (&optional confirm)
X  "Read network news.
XIf optional argument CONFIRM is non-nil, ask NNTP server."
X  (interactive "P")
X  (unwind-protect
X      (progn
X	(switch-to-buffer (get-buffer-create gnus-Group-buffer))
X	(gnus-Group-mode)
X	(gnus-start-news-server confirm))
X    (if (not (gnus-server-opened))
X	(gnus-Group-quit)
X      ;; NNTP server is successfully open. 
X      (setq mode-line-process (format " {%s}" gnus-nntp-server))
X      (let ((buffer-read-only nil))
X	(erase-buffer)
X	(gnus-Group-startup-message)
X	(sit-for 0))
X      (run-hooks 'gnus-Startup-hook)
X      (gnus-setup-news-info)
X      (if gnus-novice-user
X	  (gnus-Group-describe-briefly)) ;Show brief help message.
X      (gnus-Group-list-groups nil)
X      )))
X
X(defun gnus-Group-startup-message ()
X  "Insert startup message in current buffer."
X  ;; Insert the message.
X  (insert "
X                   GNUS Version 3.13
X
X         NNTP-based News Reader for GNU Emacs
X
X
XIf you have any trouble with this software, please let me
Xknow. I will fix your problems in the next release.
X
XComments, suggestions, and bug fixes are welcome.
X
XMasanobu UMEDA
Xumerin@tc.Nagasaki.GO.JP")
X  ;; And then hack it.
X  ;; 57 is the longest line.
X  (indent-rigidly (point-min) (point-max) (/ (max (- (window-width) 57) 0) 2))
X  (goto-char (point-min))
X  ;; +4 is fuzzy factor.
X  (insert-char ?\n (/ (max (- (window-height) 18) 0) 2)))
X
X(defun gnus-Group-list-groups (show-all)
X  "List newsgroups in the Newsgroup buffer.
XIf argument SHOW-ALL is non-nil, unsubscribed groups are also listed."
X  (interactive "P")
X  (let ((last-group			;Current newsgroup.
X	 (gnus-Group-group-name))
X	(next-group			;Next possible newsgroup.
X	 (progn
X	   (gnus-Group-search-forward nil nil)
X	   (gnus-Group-group-name)))
X	(prev-group			;Previous possible newsgroup.
X	 (progn
X	   (gnus-Group-search-forward t nil)
X	   (gnus-Group-group-name))))
X    (gnus-Group-prepare show-all)
X    (if (zerop (buffer-size))
X	(message "No news is good news")
X      ;; Go to last newsgroup if possible.  If cannot, try next and
X      ;; previous.  If all fail, go to first unread newsgroup.
X      (goto-char (point-min))
X      (or (and last-group
X	       (re-search-forward
X		(concat "^.+: " (regexp-quote last-group) "$") nil t))
X	  (and next-group
X	       (re-search-forward
X		(concat "^.+: " (regexp-quote next-group) "$") nil t))
X	  (and prev-group
X	       (re-search-forward
X		(concat "^.+: " (regexp-quote prev-group) "$") nil t))
X	  (re-search-forward "^[ \t]+[1-9][0-9]*:" nil t))
X      ;; Adjust cursor point.
X      (beginning-of-line)
X      (search-forward ":" nil t)
X      )))
X
X(defun gnus-Group-prepare (&optional all)
X  "Prepare list of newsgroups in current buffer.
XIf optional argument ALL is non-nil, unsubscribed groups are also listed."
X  (let ((buffer-read-only nil)
X	(newsrc gnus-newsrc-assoc)
X	(group-info nil)
X	(group-name nil)
X	(unread-count 0)
X	;; This specifies the format of Group buffer.
X	(cntl "%s%s%5d: %s\n"))
X    (erase-buffer)
X    ;; List newsgroups.
X    (while newsrc
X      (setq group-info (car newsrc))
X      (setq group-name (car group-info))
X      (setq unread-count (nth 1 (gnus-gethash group-name gnus-unread-hashtb)))
X      (if (or all
X	      (and (nth 1 group-info)	;Subscribed.
X		   (> unread-count 0)))	;There are unread articles.
X	  ;; Yes, I can use gnus-Group-prepare-line, but this is faster.
X	  (insert
X	   (format cntl
X		   ;; Subscribed or not.
X		   (if (nth 1 group-info) " " "U")
X		   ;; Has new news?
X		   (if (and (> unread-count 0)
X			    (>= 0
X				(- unread-count
X				   (length
X				    (cdr (assoc group-name
X						gnus-marked-assoc))))))
X		       "*" " ")
X		   ;; Number of unread articles.
X		   unread-count
X		   ;; Newsgroup name.
X		   group-name))
X	)
X      (setq newsrc (cdr newsrc))
X      )
X    (setq gnus-have-all-newsgroups all)
X    (goto-char (point-min))
X    (run-hooks 'gnus-Group-prepare-hook)
X    ))
X
X(defun gnus-Group-prepare-line (info)
X  "Return a string for the Newsgroup buffer from INFO.
XINFO is an element of gnus-newsrc-assoc or gnus-killed-assoc."
X  (let* ((group-name (car info))
X	 (unread-count
X	  (or (nth 1 (gnus-gethash group-name gnus-unread-hashtb))
X	      ;; Not in hash table, so compute it now.
X	      (gnus-number-of-articles
X	       (gnus-difference-of-range
X		(nth 2 (gnus-gethash group-name gnus-active-hashtb))
X		(nthcdr 2 info)))))
X	 ;; This specifies the format of Group buffer.
X	 (cntl "%s%s%5d: %s\n"))
X    (format cntl
X	    ;; Subscribed or not.
X	    (if (nth 1 info) " " "U")
X	    ;; Has new news?
X	    (if (and (> unread-count 0)
X		     (>= 0
X			 (- unread-count
X			    (length
X			     (cdr (assoc group-name gnus-marked-assoc))))))
X		"*" " ")
X	    ;; Number of unread articles.
X	    unread-count
X	    ;; Newsgroup name.
X	    group-name
X	    )))
X
X(defun gnus-Group-update-group (group &optional visible-only)
X  "Update newsgroup info of GROUP.
XIf optional argument VISIBLE-ONLY is non-nil, non displayed group is ignored."
X  (let ((buffer-read-only nil)
X	(visible nil))
X    ;; Buffer may be narrowed.
X    (save-restriction
X      (widen)
X      ;; Search point to modify.
X      (goto-char (point-min))
X      (if (re-search-forward (concat "^.+: " (regexp-quote group) "$") nil t)
X	  ;; GROUP is listed in current buffer. So, delete old line.
X	  (progn
X	    (setq visible t)
X	    (beginning-of-line)
X	    (delete-region (point) (progn (forward-line 1) (point)))
X	    ))
X      (if (or visible (not visible-only))
X	  (progn
X	    (insert (gnus-Group-prepare-line (assoc group gnus-newsrc-assoc)))
X	    (forward-line -1)		;Move point on that line.
X	    ))
X      )))
X
X;; GNUS Group mode command
X
X(defun gnus-Group-group-name ()
X  "Get newsgroup name around point."
X  (save-excursion
X    (beginning-of-line)
X    (if (looking-at ".[* \t]*[0-9]+:[ \t]+\\([^ \t\n]+\\)$")
X	(buffer-substring (match-beginning 1) (match-end 1))
X      )))
X
X(defun gnus-Group-read-group (all &optional no-article)
X  "Read news in this newsgroup.
XIf argument ALL is non-nil, already read articles become readable.
XIf optional argument NO-ARTICLE is non-nil, no article body is displayed."
X  (interactive "P")
X  (let ((group (gnus-Group-group-name))) ;Newsgroup name to read.
X    (if group
X	(gnus-Subject-read-group
X	 group
X	 (or all
X	     ;;(not (nth 1 (assoc group gnus-newsrc-assoc)))	;Unsubscribed
X	     (zerop
X	      (nth 1 (gnus-gethash group gnus-unread-hashtb))))	;No unread
X	 no-article
X	 ))
X    ))
X
X(defun gnus-Group-select-group (all)
X  "Select this newsgroup.
XNo article is selected automatically.
XIf argument ALL is non-nil, already read articles become readable."
X  (interactive "P")
X  (gnus-Group-read-group all t))
X
X(defun gnus-Group-jump-to-group (group)
X  "Jump to newsgroup GROUP."
X  (interactive
X   (list (completing-read "Newsgroup: " gnus-newsrc-assoc nil 'require-match)))
X  (goto-char (point-min))
X  (or (re-search-forward (concat "^.+: " (regexp-quote group) "$") nil t)
X      (if (assoc group gnus-newsrc-assoc)
X	  ;; Add GROUP entry, then seach again.
X	  (gnus-Group-update-group group)))
X  ;; Adjust cursor point.
X  (beginning-of-line)
X  (search-forward ":" nil t))
X
X(defun gnus-Group-search-forward (backward any-group)
X  "Search for newsgroup forward.
XIf 1st argument BACKWARD is non-nil, search backward instead.
XIf 2nd argument ANY-GROUP is non-nil, unsubscribed or empty group
Xmay be selected."
X  (let ((func (if backward 're-search-backward 're-search-forward))
X	(regexp 
X	 (format "^%s[ \t]*\\(%s\\):"
X		 (if any-group ".." " [ \t]")
X		 (if any-group "[0-9]+" "[1-9][0-9]*")))
X	(found nil))
X    (if backward
X	(beginning-of-line)
X      (end-of-line))
X    (setq found (funcall func regexp nil t))
X    ;; Adjust cursor point.
X    (beginning-of-line)
X    (search-forward ":" nil t)
X    ;; Return T if found.
X    found
X    ))
X
X(defun gnus-Group-next-group (n)
X  "Go to next N'th newsgroup."
X  (interactive "p")
X  (while (and (> n 1)
X	      (gnus-Group-search-forward nil t))
X    (setq n (1- n)))
X  (or (gnus-Group-search-forward nil t)
X      (message "No more newsgroups")))
X
X(defun gnus-Group-next-unread-group (n)
X  "Go to next N'th unread newsgroup."
X  (interactive "p")
X  (while (and (> n 1)
X	      (gnus-Group-search-forward nil nil))
X    (setq n (1- n)))
X  (or (gnus-Group-search-forward nil nil)
X      (message "No more unread newsgroups")))
X
X(defun gnus-Group-prev-group (n)
X  "Go to previous N'th newsgroup."
X  (interactive "p")
X  (while (and (> n 1)
X	      (gnus-Group-search-forward t t))
X    (setq n (1- n)))
X  (or (gnus-Group-search-forward t t)
X      (message "No more newsgroups")))
X
X(defun gnus-Group-prev-unread-group (n)
X  "Go to previous N'th unread newsgroup."
X  (interactive "p")
X  (while (and (> n 1)
X	      (gnus-Group-search-forward t nil))	      
X    (setq n (1- n)))
X  (or (gnus-Group-search-forward t nil)
X      (message "No more unread newsgroups")))
X
X(defun gnus-Group-catch-up (all &optional quietly)
X  "Mark all articles not marked as unread in current newsgroup as read.
XIf prefix argument ALL is non-nil, all articles are marked as read.
XCross references (Xref: field) of articles are ignored."
X  (interactive "P")
X  (let* ((group (gnus-Group-group-name))
X         (marked (if (not all)
X		     (cdr (assoc group gnus-marked-assoc)))))
X    (and group
X	 (or quietly
X	     (y-or-n-p
X	      (if all
X		  "Do you really want to mark everything as read? "
X		"Delete all articles not marked as read? ")))
X	 (progn
X	   (message "")			;Erase "Yes or No" question.
X	   ;; Any marked articles will be preserved.
X	   (gnus-update-unread-articles group marked marked)
X	   (gnus-Group-update-group group)
X	   (gnus-Group-next-group 1)))
X    ))
X
X(defun gnus-Group-catch-up-all (&optional quietly)
X  "Mark all articles in current newsgroup as read.
XCross references (Xref: field) of articles are ignored."
X  (interactive)
X  (gnus-Group-catch-up t quietly))
X
X(defun gnus-Group-unsubscribe-current-group ()
X  "Toggle subscribe from/to unsubscribe current group."
X  (interactive)
X  (gnus-Group-unsubscribe-group (gnus-Group-group-name))
X  (gnus-Group-next-group 1))
X
X(defun gnus-Group-unsubscribe-group (group)
X  "Toggle subscribe from/to unsubscribe GROUP.
XNew newsgroup is added to .newsrc automatically."
X  (interactive
X   (list (completing-read "Newsgroup: "
X			  gnus-active-hashtb nil 'require-match)))
X  (let ((newsrc (assoc group gnus-newsrc-assoc)))
X    (cond ((not (null newsrc))
X	   ;; Toggle subscription flag.
X	   (setcar (nthcdr 1 newsrc) (not (nth 1 newsrc)))
X	   (gnus-update-newsrc-buffer group)
X	   (gnus-Group-update-group group)
X	   ;; Adjust cursor point.
X	   (beginning-of-line)
X	   (search-forward ":" nil t))
X	  ((and (stringp group)
X		(gnus-gethash group gnus-active-hashtb))
X	   ;; Add new newsgroup.
X	   (gnus-add-newsgroup group)
X	   (gnus-Group-update-group group)
X	   ;; Adjust cursor point.
X	   (beginning-of-line)
X	   (search-forward ":" nil t))
X	  (t (error "No such newsgroup: %s" group)))
X    ))
X
X(defun gnus-Group-list-all-groups ()
X  "List all of newsgroups in the Newsgroup buffer."
X  (interactive)
X  (gnus-Group-list-groups t))
X
X(defun gnus-Group-get-new-news ()
X  "Get newly arrived articles. In fact, read the active file again."
X  (interactive)
X  (gnus-setup-news-info)
X  (gnus-Group-list-groups gnus-have-all-newsgroups))
X
X(defun gnus-Group-restart ()
X  "Force GNUS to read the raw startup file."
X  (interactive)
X  (gnus-save-newsrc-file)
X  (gnus-setup-news-info t)		;Force to read the raw startup file.
X  (gnus-Group-list-groups gnus-have-all-newsgroups))
X
X(defun gnus-Group-check-bogus-groups ()
X  "Check bogus newsgroups."
X  (interactive)
X  (gnus-check-bogus-newsgroups t)	;Require confirmation.
X  (gnus-Group-list-groups gnus-have-all-newsgroups))
X
X(defun gnus-Group-restrict-groups (start end)
X  "Restrict visible newsgroups to the current region (START and END).
XType \\[widen] to remove restriction."
X  (interactive "r")
X  (save-excursion
X    (narrow-to-region (progn
X			(goto-char start)
X			(beginning-of-line)
X			(point))
X		      (progn
X			(goto-char end)
X			(forward-line 1)
X			(point))))
X  (message (substitute-command-keys "Type \\[widen] to remove restriction")))
X
X(defun gnus-Group-edit-global-kill ()
X  "Edit a global KILL file."
X  (interactive)
X  (setq gnus-current-kill-article nil)	;No articles selected.
X  (gnus-Kill-file-edit-file nil) 	;Nil stands for global KILL file.
X  (message
X   (substitute-command-keys
X    "Editing a global KILL file (Type \\[gnus-Kill-file-exit] to exit)")))
X
X(defun gnus-Group-edit-local-kill ()
X  "Edit a local KILL file."
X  (interactive)
X  (setq gnus-current-kill-article nil)	;No articles selected.
X  (gnus-Kill-file-edit-file (gnus-Group-group-name))
X  (message
X   (substitute-command-keys
X    "Editing a local KILL file (Type \\[gnus-Kill-file-exit] to exit)")))
X
X(defun gnus-Group-force-update ()
X  "Update .newsrc file."
X  (interactive)
X  (gnus-save-newsrc-file))
X
X(defun gnus-Group-suspend ()
X  "Suspend the current GNUS session.
XIn fact, cleanup buffers except for Group Mode buffer.
XThe hook gnus-Suspend-gnus-hook is called before actually suspending."
X  (interactive)
X  (run-hooks 'gnus-Suspend-gnus-hook)
X  ;; Kill GNUS buffers except for Group Mode buffer.
X  (let ((buffers gnus-buffer-list))
X    (while buffers
X      (and (not (eq (car buffers) gnus-Group-buffer))
X	   (get-buffer (car buffers))
X	   (kill-buffer (car buffers)))
X      (setq buffers (cdr buffers))
X      ))
X  (bury-buffer))
X
X(defun gnus-Group-exit ()
X  "Quit reading news after updating .newsrc.
XThe hook gnus-Exit-gnus-hook is called before actually quitting."
X  (interactive)
X  (if (or noninteractive		;For gnus-batch-kill
X	  (zerop (buffer-size))		;No news is good news.
X	  (not (gnus-server-opened))	;NNTP connection closed.
X	  (y-or-n-p "Are you sure you want to quit reading news? "))
X      (progn
X	(message "")			;Erase "Yes or No" question.
X	(run-hooks 'gnus-Exit-gnus-hook)
X	(gnus-save-newsrc-file)
X	(gnus-clear-system)
X	(gnus-close-server))
X    ))
X
X(defun gnus-Group-quit ()
X  "Quit reading news without updating .newsrc.
XThe hook gnus-Exit-gnus-hook is called before actually quitting."
X  (interactive)
X  (if (or (zerop (buffer-size))
X	  (not (gnus-server-opened))
X	  (yes-or-no-p
X	   (format "Quit reading news without saving %s? "
X		   (file-name-nondirectory gnus-current-startup-file))))
X      (progn
X	(message "")			;Erase "Yes or No" question.
X	(run-hooks 'gnus-Exit-gnus-hook)
X	(gnus-clear-system)
X	(gnus-close-server))
X    ))
X
X(defun gnus-Group-describe-briefly ()
X  "Describe Group mode commands briefly."
X  (interactive)
X  (message
X   (concat
X    (substitute-command-keys "\\[gnus-Group-read-group]:Select  ")
X    (substitute-command-keys "\\[gnus-Group-next-unread-group]:Forward  ")
X    (substitute-command-keys "\\[gnus-Group-prev-unread-group]:Backward  ")
X    (substitute-command-keys "\\[gnus-Group-exit]:Exit  ")
X    (substitute-command-keys "\\[gnus-Info-find-node]:Run Info  ")
X    (substitute-command-keys "\\[gnus-Group-describe-briefly]:This help")
X    )))
X
X
X;;;
X;;; GNUS Subject Mode
X;;;
X
X(if gnus-Subject-mode-map
X    nil
X  (setq gnus-Subject-mode-map (make-keymap))
X  (suppress-keymap gnus-Subject-mode-map)
X  (define-key gnus-Subject-mode-map " " 'gnus-Subject-next-page)
X  (define-key gnus-Subject-mode-map "\177" 'gnus-Subject-prev-page)
X  (define-key gnus-Subject-mode-map "\r" 'gnus-Subject-scroll-up)
X  (define-key gnus-Subject-mode-map "n" 'gnus-Subject-next-unread-article)
X  (define-key gnus-Subject-mode-map "p" 'gnus-Subject-prev-unread-article)
X  (define-key gnus-Subject-mode-map "N" 'gnus-Subject-next-article)
X  (define-key gnus-Subject-mode-map "P" 'gnus-Subject-prev-article)
X  (define-key gnus-Subject-mode-map "\e\C-n" 'gnus-Subject-next-same-subject)
X  (define-key gnus-Subject-mode-map "\e\C-p" 'gnus-Subject-prev-same-subject)
X  ;;(define-key gnus-Subject-mode-map "\e\C-n" 'gnus-Subject-next-unread-same-subject)
X  ;;(define-key gnus-Subject-mode-map "\e\C-p" 'gnus-Subject-prev-unread-same-subject)
X  (define-key gnus-Subject-mode-map "\C-c\C-n" 'gnus-Subject-next-digest)
X  (define-key gnus-Subject-mode-map "\C-c\C-p" 'gnus-Subject-prev-digest)
X  (define-key gnus-Subject-mode-map "\C-n" 'gnus-Subject-next-subject)
X  (define-key gnus-Subject-mode-map "\C-p" 'gnus-Subject-prev-subject)
X  (define-key gnus-Subject-mode-map "\en" 'gnus-Subject-next-unread-subject)
X  (define-key gnus-Subject-mode-map "\ep" 'gnus-Subject-prev-unread-subject)
X  ;;(define-key gnus-Subject-mode-map "\C-cn" 'gnus-Subject-next-group)
X  ;;(define-key gnus-Subject-mode-map "\C-cp" 'gnus-Subject-prev-group)
X  (define-key gnus-Subject-mode-map "." 'gnus-Subject-first-unread-article)
X  (define-key gnus-Subject-mode-map "/" 'isearch-forward)
X  (define-key gnus-Subject-mode-map "s" 'gnus-Subject-isearch-article)
X  (define-key gnus-Subject-mode-map "\es" 'gnus-Subject-search-article-forward)
X  (define-key gnus-Subject-mode-map "\eS" 'gnus-Subject-search-article-backward)
X  (define-key gnus-Subject-mode-map "<" 'gnus-Subject-beginning-of-article)
X  (define-key gnus-Subject-mode-map ">" 'gnus-Subject-end-of-article)
X  (define-key gnus-Subject-mode-map "j" 'gnus-Subject-goto-subject)
X  (define-key gnus-Subject-mode-map "J" 'gnus-Subject-goto-article)
X  (define-key gnus-Subject-mode-map "l" 'gnus-Subject-goto-last-article)
X  (define-key gnus-Subject-mode-map "^" 'gnus-Subject-refer-parent-article)
X  (define-key gnus-Subject-mode-map "\er" 'gnus-Subject-refer-article)
X  (define-key gnus-Subject-mode-map "u" 'gnus-Subject-mark-as-unread-forward)
X  (define-key gnus-Subject-mode-map "U" 'gnus-Subject-mark-as-unread-backward)
X  (define-key gnus-Subject-mode-map "d" 'gnus-Subject-mark-as-read-forward)
X  (define-key gnus-Subject-mode-map "D" 'gnus-Subject-mark-as-read-backward)
X  (define-key gnus-Subject-mode-map "\eu" 'gnus-Subject-clear-mark-forward)
X  (define-key gnus-Subject-mode-map "\eU" 'gnus-Subject-clear-mark-backward)
X  (define-key gnus-Subject-mode-map "k" 'gnus-Subject-kill-same-subject-and-select)
X  (define-key gnus-Subject-mode-map "\C-k" 'gnus-Subject-kill-same-subject)
X  (define-key gnus-Subject-mode-map "\e\C-t" 'gnus-Subject-toggle-threads)
X  (define-key gnus-Subject-mode-map "\e\C-s" 'gnus-Subject-show-thread)
X  (define-key gnus-Subject-mode-map "\e\C-h" 'gnus-Subject-hide-thread)
X  (define-key gnus-Subject-mode-map "\e\C-f" 'gnus-Subject-next-thread)
X  (define-key gnus-Subject-mode-map "\e\C-b" 'gnus-Subject-prev-thread)
X  (define-key gnus-Subject-mode-map "\e\C-u" 'gnus-Subject-up-thread)
X  (define-key gnus-Subject-mode-map "\e\C-d" 'gnus-Subject-down-thread)
X  (define-key gnus-Subject-mode-map "\e\C-k" 'gnus-Subject-kill-thread)
X  (define-key gnus-Subject-mode-map "&" 'gnus-Subject-execute-command)
X  ;;(define-key gnus-Subject-mode-map "c" 'gnus-Subject-catch-up)
X  ;;(define-key gnus-Subject-mode-map "c" 'gnus-Subject-catch-up-all)
SHAR_EOF
echo "End of part 2, continue with part 3"
echo "3" > s2_seq_.tmp
exit 0
--
Masanobu UMEDA
umerin@tc.Nagasaki.GO.JP
