Fixes for XEmacs
authorDidier Verna <didier@xemacs.org>
Tue, 9 Jan 2001 17:03:40 +0000 (17:03 +0000)
committerDidier Verna <didier@xemacs.org>
Tue, 9 Jan 2001 17:03:40 +0000 (17:03 +0000)
lisp/ChangeLog
lisp/dgnushack.el
lisp/gnus-agent.el
lisp/gnus-art.el
lisp/gnus-group.el
lisp/gnus-salt.el
lisp/gnus-sum.el
lisp/gnus-topic.el
lisp/gnus-xmas.el

index 9f7a399..4c2fd71 100644 (file)
@@ -1,3 +1,19 @@
+2001-01-09  Didier Verna  <didier@xemacs.org>
+
+       * dgnushack.el (dgnushack-compile): give a dummy value to
+       `gnus-xmas-glyph-directory' for the time of compilation.
+       * gnus-agent.el: moved some XEmacs specific hook add-ons from
+       `gnus-xmas-[re]define' to avoid loosing user custom settings.
+       * gnus-art.el: ditto.
+       * gnus-group.el: ditto.
+       * gnus-salt.el: ditto.
+       * gnus-sum.el: ditto.
+       * gnus-topic.el: ditto.
+       * gnus-xmas.el (gnus-xmas-define): see above.
+       * gnus-xmas.el (gnus-xmas-redefine): see above.
+       * gnus-xmas.el (gnus-xmas-glyph-directory): generate a
+       non-continuable error when the directory can't be found.
+
 2001-01-09 01:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * mm-decode.el (mm-interactively-view-part): Don't copy-sequence
@@ -16,8 +32,8 @@
 
 2001-01-08 22:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-xmas.el (gnus-xmas-modeline-glyph): 
-       (gnus-xmas-group-startup-message): 
+       * gnus-xmas.el (gnus-xmas-modeline-glyph):
+       (gnus-xmas-group-startup-message):
        Detect gnus-xmas-glyph-directory when it is nil.
 
 2001-01-08 09:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
@@ -34,7 +50,7 @@
 2001-01-04 11:06:14  Gregory Chernov  <greg@visiontech-dml.com>
 
        * nnslashdot.el (nnslashdot-request-list): Always get the right
-       sid. 
+       sid.
 
 2001-01-05 00:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
@@ -54,7 +70,7 @@
 2001-01-02 06:28:28  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-sum.el (gnus-summary-expire-articles): Don't save
-       excursion. 
+       excursion.
 
        * nnslashdot.el (nnslashdot-request-list): Get the right year.
 
@@ -78,7 +94,7 @@
        (gnus-summary-setup-buffer): Use it.
 
        * gnus-draft.el: Set things up with the right post method and
-       stuff. 
+       stuff.
 
        * message.el (message-ignored-news-headers): Remove X-Draft-From.
 
 
        * mm-uu.el (mm-uu-pgp-signed-extract-1): Unquote "- " quotes.
 
-       * dgnushack.el (dgnushack-compile): Message whether there is w3. 
+       * dgnushack.el (dgnushack-compile): Message whether there is w3.
        Don't (push "/usr/share/emacs/site-lisp" load-path).
 
        * gnus-cite.el (gnus-article-fill-cited-article): Don't add space
        * nnmail.el (nnmail-expiry-wait): Not an integer.
 
        * message.el (message-goto-body): Only expand abbrev when called
-       interactively. 
+       interactively.
        (message-make-lines): Use it.
 
 2000-12-29 20:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
        after the fill prefix.
 
        * gnus-sum.el (gnus-summary-make-menu-bar): Removed "Enter
-       score...". 
+       score...".
 
        * gnus-art.el (gnus-ignored-headers): Hide more headers.
 
        * mm-bodies.el (mm-long-lines-p): New function.
        (mm-body-encoding): Use it.
        (mm-body-encoding): Encode articles with lines longer than 1000
-       characters. 
+       characters.
 
 2000-12-29 01:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 
        * nnheader.el (nnheader-string-as-multibyte): New alias.
 
-       * mm-view.el (mm-inline-text): Warn when bugging out in w3. 
+       * mm-view.el (mm-inline-text): Warn when bugging out in w3.
 
        * gnus-uu.el (gnus-message-process-mark): New function.
        (gnus-uu-mark-by-regexp): Use it.
 2000-11-01 01:12:29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * nnwfm.el (nnwfm-create-mapping): Remove quote marks and
-       backslashes. 
+       backslashes.
 
 2000-12-26  Katsumi Yamaoka <yamaoka@jpl.org>
 
        * gnus-vm.el (gnus-summary-save-article-vm): Require gnus-art
        before binding gnus-default-article-saver.
 
-       * gnus-sum.el (gnus-summary-save-article): 
-       (gnus-summary-pipe-output): 
-       (gnus-summary-save-article-mail): 
-       (gnus-summary-save-article-rmail): 
-       (gnus-summary-save-article-file): 
-       (gnus-summary-write-article-file): 
+       * gnus-sum.el (gnus-summary-save-article):
+       (gnus-summary-pipe-output):
+       (gnus-summary-save-article-mail):
+       (gnus-summary-save-article-rmail):
+       (gnus-summary-save-article-file):
+       (gnus-summary-write-article-file):
        (gnus-summary-save-article-body-file): Ditto.
 
        * gnus-mh.el (gnus-summary-save-article-folder): Ditto.
 
 2000-12-22 10:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-art.el (gnus-mime-security-button-map): 
+       * gnus-art.el (gnus-mime-security-button-map):
        (gnus-mime-button-map): Add parent.
 
 2000-12-22 09:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
        * mm-util.el (mm-image-load-path): New function.
 
        * gnus-group.el (gnus-group-make-tool-bar): Use it.
-       
+
        * gnus-sum.el (gnus-summary-make-tool-bar): Use it.
-       
+
        * message.el (message-tool-bar-map): Use it.
 
        * Makefile.in (install-el): New.
        * mml.el (gnus-ems): Require it.
 
        * gnus-msg.el (gnus-summary-mail-forward):
-       
+
        * message.el (message-forward):  Move mime-to-mml here.
 
 2000-12-20 02:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
        * smiley-ems.el (smiley-regexp-alist): Make regexps match
        at the end of the buffer.
        (smiley-region): In the loop, move to the end of the submatch
-       matching the smiley instead of using the end of the match 
+       matching the smiley instead of using the end of the match
        of the whole regexp.
 
 2000-12-12  Eli Zaretskii  <eliz@is.elta.co.il>
 2000-12-12  Gerd Moellmann  <gerd@gnu.org>
 
        * smiley-ems.el (smiley-region): Doc fix.
-       
+
 2000-12-11  Miles Bader  <miles@gnu.org>
 
        * gnus-sum.el (gnus-summary-recenter): When trying to keep the
        * gnus-art.el (gnus-mime-button-map): Don't inherit from
        gnus-article-mode-map.
 ;      (gnus-mime-button-menu): Use mouse-set-point.
-       (gnus-insert-mime-button, gnus-mime-display-alternative) 
+       (gnus-insert-mime-button, gnus-mime-display-alternative)
        (gnus-mime-display-alternative): Don't use local-map property.
 
 2000-11-17  Dave Love  <fx@gnu.org>
 
        * gnus-start.el (gnus-read-newsrc-file): Add :version.
 
-       * gnus-art.el (gnus-article-banner-alist) 
-       (gnus-emphasize-whitespace-regexp, gnus-ignored-mime-types) 
-       (gnus-article-date-lapsed-new-header) 
-       (gnus-article-mime-match-handle-function, gnus-mime-action-alist) 
-       (gnus-treat-strip-list-identifiers, gnus-treat-date-iso8601) 
-       (gnus-treat-strip-headers-in-body) 
-       (gnus-treat-capitalize-sentences, gnus-treat-play-sounds) 
+       * gnus-art.el (gnus-article-banner-alist)
+       (gnus-emphasize-whitespace-regexp, gnus-ignored-mime-types)
+       (gnus-article-date-lapsed-new-header)
+       (gnus-article-mime-match-handle-function, gnus-mime-action-alist)
+       (gnus-treat-strip-list-identifiers, gnus-treat-date-iso8601)
+       (gnus-treat-strip-headers-in-body)
+       (gnus-treat-capitalize-sentences, gnus-treat-play-sounds)
        (gnus-treat-translate): Add :version.
        (gnus-article-mime-part-function): Fix defcustom.
 
-       * nnmail.el (nnmail-expiry-target) 
-       (nnmail-scan-directory-mail-source-once, nnmail-extra-headers) 
+       * nnmail.el (nnmail-expiry-target)
+       (nnmail-scan-directory-mail-source-once, nnmail-extra-headers)
        (nnmail-split-header-length-limit): Add :version.
 
-       * gnus-sum.el (gnus-auto-expirable-marks) 
-       (gnus-inhibit-user-auto-expire, gnus-list-identifiers) 
-       (gnus-extra-headers, gnus-ignored-from-addresses) 
-       (gnus-newsgroup-ignored-charsets) 
-       (gnus-group-highlight-words-alist) 
+       * gnus-sum.el (gnus-auto-expirable-marks)
+       (gnus-inhibit-user-auto-expire, gnus-list-identifiers)
+       (gnus-extra-headers, gnus-ignored-from-addresses)
+       (gnus-newsgroup-ignored-charsets)
+       (gnus-group-highlight-words-alist)
        (gnus-summary-show-article-charset-alist): Add :version.
 
        * catchup.pbm, describe-group.pbm, exit-gnus.pbm, get-news.pbm:
 ;      * message.el (message-mode) <adaptive-fill-regexp>:
 ;      <adaptive-fill-first-line-regexp>: Use [:alnum:] in regexp range.
 ;      (message-newline-and-reformat): Likewise.
-       (message-forward-as-mime, message-forward-ignored-headers) 
-       (message-buffer-naming-style, message-default-charset) 
+       (message-forward-as-mime, message-forward-ignored-headers)
+       (message-buffer-naming-style, message-default-charset)
        (message-dont-reply-to-names, message-send-mail-partially-limit):
        Add :version.
 
 
 2000-11-09  Dave Love  <fx@gnu.org>
 
-       * gnus-group.el (gnus-group-make-directory-group) 
+       * gnus-group.el (gnus-group-make-directory-group)
        (gnus-group-fetch-faq): Use expand-file-name.
        (gnus-group-fetch-faq): Simplify completing-read form.
 
        (gnus-tm-lisp-directory): Deleted.
        (gnus-use-installed-mailcrypt, gnus-emacs-lisp-directory): Use
        (featurep 'xemacs).
-       (gnus-gnus-lisp-directory, gnus-mailcrypt-lisp-directory) 
+       (gnus-gnus-lisp-directory, gnus-mailcrypt-lisp-directory)
        (gnus-mailcrypt-lisp-directory, gnus-bbdb-lisp-directory): Remove
        version numbers from file names.
 
        of the `gnus-xemacs' variable, as the latter has been removed.
        * gnus-start.el (gnus-1, gnus-read-descriptions-file): Likewise.
        * gnus-art.el (gnus-treat-display-xface)
-       (gnus-treat-display-smileys, gnus-treat-display-picons) 
+       (gnus-treat-display-smileys, gnus-treat-display-picons)
        (gnus-article-read-summary-keys): Likewise.
 
 2000-10-26  Dave Love  <fx@gnu.org>
 
 2000-09-14  Dave Love  <fx@gnu.org>
 
-       * gnus.el (gnus-charset): 
+       * gnus.el (gnus-charset):
        * mm-decode.el (mime-display):
        * imap.el (imap) <defgroup>: Add :version.
 
 
        * mml.el (mml-mode-map): Change mml prefix from `M-m' to `C-c C-m'
        to avoid conflict with the standard `back-to-indentation'
-       binding. 
+       binding.
 
 2000-12-17 10:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        Also do some repair work, if we find articles that are missing the
        appropriate X-Gnus-Newsgroup lines in the header.  We can usually
        reconstruct these from Xref info.
-       
+
 2000-12-04 18:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * mail-source.el (mail-source-report-new-mail): Use
        (mail-source-check-pop): Ditto.
        (mail-source-start-idle-timer): Prevent multiple pop checks
        running if the check takes a long time.
-       
+
 2000-12-04 14:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-msg.el (gnus-msg-mail): COMPOSEFUNC should return t if
 
        * gnus-cite.el (gnus-article-hide-citation): Use them.
        (gnus-article-toggle-cited-text): Use them.
-       
+
        * gnus-art.el (gnus-signature-toggle): Use them.
        (gnus-article-show-hidden-text): Ditto.
        (gnus-article-hide-text): Ditto.
 2000-11-29 20:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * nnfolder.el (nnfolder-request-expire-articles): expiry-target.
-       
+
        * nnbabyl.el (nnbabyl-request-expire-articles): Ditto.
-       
+
        * nnmbox.el (nnmbox-request-expire-articles): Ditto.
 
 2000-11-22  Jan Nieuwenhuizen  <janneke@gnu.org>
        (mml-smime-encrypt-buffer): Use mml-smime-encrypt.
 
        * mml-smime.el (mml-smime-sign): New function.
-       (mml-smime-encrypt): 
-       (mml-smime-sign-query): 
-       (mml-smime-get-file-cert): 
-       (mml-smime-get-dns-cert): 
+       (mml-smime-encrypt):
+       (mml-smime-sign-query):
+       (mml-smime-get-file-cert):
+       (mml-smime-get-dns-cert):
        (mml-smime-encrypt-query): Moved from mml-sec.el.
 
 2000-11-16  Simon Josefsson  <sj@extundo.com>
 
        * rfc2231.el (rfc2231-encode-string): Insert semi-colon and
        leading space.
-       * mm-extern.el (mm-inline-external-body): Report error when no 
+       * mm-extern.el (mm-inline-external-body): Report error when no
        access-type.
 
 2000-11-12 19:48:30  ShengHuo ZHU  <zsh@cs.rochester.edu>
        as multipart/mixed.
 
 2000-11-12  David Edmondson  <dme@dme.org>
-       
+
        * message.el (message-cite-prefix-regexp): moved from gnus-cite.el
        and replace `.' with `\w' to allow for different syntax tables
        (from Vladimir Volovich).
        * mml2015.el (mml2015-gpg-verify): Set "OK" security status.
 
        * smime.el (smime-details-buffer): New variable.
-       (smime-sign-region): 
-       (smime-encrypt-region): 
-       (smime-verify-region): 
+       (smime-sign-region):
+       (smime-encrypt-region):
+       (smime-verify-region):
        (smime-decrypt-region): Copy OpenSSL output to the buffer.
 
        * mml-smime.el (mml-smime-verify): Support security info.
        names.  (Report from Nevin Kapur)
 
 2000-11-10 01:23:20  ShengHuo ZHU  <zsh@cs.rochester.edu>
-  
+
        * mm-partial.el (mm-inline-partial): Insert MIME-Version.
 
 2000-11-09 17:02:50  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
 2000-11-08 19:58:58  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * mml2015.el (mml2015-gpg-decrypt-1): 
+       * mml2015.el (mml2015-gpg-decrypt-1):
        (mml2015-gpg-verify): buffer-string has no argument in Emacs.
 
 2000-11-08 16:37:02  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * pop3.el (pop3-munge-message-separator): A message may have an
        empty body.
-  
+
 2000-11-07 18:02:26  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * mm-uu.el (mm-uu-type-alist): Don't test pgp stuff.
 2000-02-02 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
 
        * gnus-mlspl.el: Documentation tweaks.
-       
+
 2000-11-06 22:06:44  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * mm-decode.el (mm-possibly-verify-or-decrypt): Fix.  
+       * mm-decode.el (mm-possibly-verify-or-decrypt): Fix.
        * gnus-art.el (gnus-article-encrypt-body): Rename and support prefix
        argument.
 
        * mm-decode.el (mml-smime-verify): Autoload mml-smime.
 
        Verify S/MIME signature support.
-       
+
        * mm-decode.el (mm-inline-media-tests): Add
        application/{x-,}pkcs7-signature.
        (mm-inlined-types): Ditto.
 
        * message.el (message-font-lock-keywords): Match a final newline
        to help font-lock's multiline support.
-       
+
 2000-11-04 09:11:44  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * nnoo.el (nnoo-set): New function.
 
        * message.el (message-get-reply-headers): Better handling when
        Mail-Followup-To is very large.
-       
+
 2000-11-02 13:27:56  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
-       * gnus-uu.el (gnus-uu-post-news): Comment out the redundancy.  
-       * gnus-art.el (gnus-article-edit-done): 
-       * gnus-sum.el (gnus-summary-edit-article-done): Move line 
+       * gnus-uu.el (gnus-uu-post-news): Comment out the redundancy.
+       * gnus-art.el (gnus-article-edit-done):
+       * gnus-sum.el (gnus-summary-edit-article-done): Move line
        counting code here.
        * gnus-msg.el (gnus-setup-message): Remove a hack.
 
 2000-11-02 09:33:01  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-sum.el (gnus-newsgroup-variables): New variable.
-       (gnus-summary-mode): Make them local variables. 
+       (gnus-summary-mode): Make them local variables.
        (gnus-set-global-variables): Globalize them.
        (gnus-summary-exit): Kill them.
 
 
 2000-11-01 01:12:29  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * nnultimate.el (nnultimate-create-mapping): Use nreverse. 
+       * nnultimate.el (nnultimate-create-mapping): Use nreverse.
 
 2000-10-31 23:45:31  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2000-10-16 11:36:52  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * nnultimate.el (nnultimate-forum-table-p): Be a bit more
-       restrictive. 
+       restrictive.
        (nnultimate-table-regexp): New variable.
        (nnultimate-forum-table-p): Use it.
 
        (gnus-request-accept-article): Ditto.
        * mml.el (mml-preview): Use them.
        * gnus-sum.el (gnus-summary-edit-article): Use them.
-       
+
        * message.el (message-options-get): New function.
        (message-options-get): New function.
        * rfc2047.el (rfc2047-encode-message-header): Use them.
 
 2000-10-28  Simon Josefsson  <sj@extundo.com>
 
-       * nnimap.el (nnimap-retrieve-which-headers): 
+       * nnimap.el (nnimap-retrieve-which-headers):
        (nnimap-request-article-part): Quote message-id.
 
        * smime.el (smime-CA-directory): Rename from `smime-CAs'.
index fbb58b9..796707e 100644 (file)
 
 (defvar srcdir (or (getenv "srcdir") "."))
 
-(push (or (getenv "lispdir") 
+(push (or (getenv "lispdir")
          "/usr/share/emacs/site-lisp")
       load-path)
 
-(push (or (getenv "W3DIR") (expand-file-name "../../w3/lisp/" srcdir)) 
+(push (or (getenv "W3DIR") (expand-file-name "../../w3/lisp/" srcdir))
       load-path)
 
 (push "/usr/share/emacs/site-lisp" load-path)
@@ -119,6 +119,10 @@ Modify to suit your needs."))
   (let ((files (directory-files srcdir nil "^[^=].*\\.el$"))
        ;;(byte-compile-generate-call-tree t)
        file elc)
+    ;; Avoid barfing (from gnus-xmas) because the etc directory is not yet
+    ;; installed.
+    (when (featurep 'xemacs)
+      (setq gnus-xmas-glyph-directory "dummy"))
     (dolist (file '("dgnushack.el" "lpath.el"))
       (setq files (delete file files)))
     (when (featurep 'base64)
@@ -131,23 +135,23 @@ Modify to suit your needs."))
                       "nnslashdot.el" "nnwarchive.el" "webmail.el"
                       "nnwfm.el"))
         (setq files (delete file files)))))
-    (dolist (file 
+    (dolist (file
             (if (featurep 'xemacs)
                 '("md5.el" "smiley-ems.el")
-              '("gnus-xmas.el" "gnus-picon.el" "messagexmas.el" 
+              '("gnus-xmas.el" "gnus-picon.el" "messagexmas.el"
                 "nnheaderxm.el" "smiley.el")))
       (setq files (delete file files)))
 
     (dolist (file files)
       (setq file (expand-file-name file srcdir))
-      (when (and (file-exists-p 
+      (when (and (file-exists-p
                  (setq elc (concat (file-name-nondirectory file) "c")))
                 (file-newer-than-file-p file elc))
        (delete-file elc)))
-    
+
     (while (setq file (pop files))
       (setq file (expand-file-name file srcdir))
-      (when (or (not (file-exists-p 
+      (when (or (not (file-exists-p
                      (setq elc (concat (file-name-nondirectory file) "c"))))
                (file-newer-than-file-p file elc))
        (ignore-errors
@@ -158,4 +162,3 @@ Modify to suit your needs."))
   (byte-recompile-directory "." 0))
 
 ;;; dgnushack.el ends here
-
index 412fc68..66a9169 100644 (file)
@@ -70,16 +70,28 @@ If nil, only read articles will be expired."
   :group 'gnus-agent
   :type 'hook)
 
+;; Extracted from gnus-xmas-redefine in order to preserve user settings
+(when (featurep 'xemacs)
+  (add-hook 'gnus-agent-group-mode-hook 'gnus-xmas-agent-group-menu-add))
+
 (defcustom gnus-agent-summary-mode-hook nil
   "Hook run in Agent summary minor modes."
   :group 'gnus-agent
   :type 'hook)
 
+;; Extracted from gnus-xmas-redefine in order to preserve user settings
+(when (featurep 'xemacs)
+  (add-hook 'gnus-agent-summary-mode-hook 'gnus-xmas-agent-summary-menu-add))
+
 (defcustom gnus-agent-server-mode-hook nil
   "Hook run in Agent summary minor modes."
   :group 'gnus-agent
   :type 'hook)
 
+;; Extracted from gnus-xmas-redefine in order to preserve user settings
+(when (featurep 'xemacs)
+  (add-hook 'gnus-agent-server-mode-hook 'gnus-xmas-agent-server-menu-add))
+
 (defcustom gnus-agent-confirmation-function 'y-or-n-p
   "Function to confirm when error happens."
   :version "21.1"
@@ -393,10 +405,10 @@ be a select method."
   (save-restriction
     (message-narrow-to-headers)
     (let* ((gcc (mail-fetch-field "gcc" nil t))
-          (methods (and gcc 
+          (methods (and gcc
                         (mapcar 'gnus-inews-group-method
                                 (message-unquote-tokens
-                                 (message-tokenize-header 
+                                 (message-tokenize-header
                                   gcc " ,")))))
           covered)
       (while (and (not covered) methods)
@@ -513,7 +525,7 @@ be a select method."
   (when (or (and gnus-agent-synchronize-flags
                 (not (eq gnus-agent-synchronize-flags 'ask)))
            (and (eq gnus-agent-synchronize-flags 'ask)
-                (gnus-y-or-n-p (format "Synchronize flags on server `%s'? " 
+                (gnus-y-or-n-p (format "Synchronize flags on server `%s'? "
                                        (cadr method)))))
     (gnus-agent-synchronize-flags-server method)))
 
@@ -702,7 +714,7 @@ the actual number of articles toggled is returned."
       (gnus-make-directory (file-name-directory file))
       (with-temp-file file
        ;; Emacs got problem to match non-ASCII group in multibyte buffer.
-       (mm-disable-multibyte) 
+       (mm-disable-multibyte)
        (when (file-exists-p file)
          (nnheader-insert-file-contents file))
        (goto-char (point-min))
@@ -730,7 +742,7 @@ the actual number of articles toggled is returned."
     (nnheader-translate-file-chars
      (nnheader-replace-chars-in-string
       (nnheader-replace-duplicate-chars-in-string
-       (nnheader-replace-chars-in-string 
+       (nnheader-replace-chars-in-string
        (gnus-group-real-name group)
        ?/ ?_)
        ?. ?_)
@@ -847,8 +859,8 @@ the actual number of articles toggled is returned."
          (with-temp-buffer
            (let (article)
              (while (setq article (pop articles))
-               (when (or 
-                      (gnus-backlog-request-article group article 
+               (when (or
+                      (gnus-backlog-request-article group article
                                                     nntp-server-buffer)
                       (gnus-request-article article group))
                  (goto-char (point-max))
@@ -1087,11 +1099,11 @@ the actual number of articles toggled is returned."
                  (while (setq group (pop groups))
                    (when (<= (gnus-group-level group) gnus-agent-handle-level)
                      (gnus-agent-fetch-group-1 group gnus-command-method))))))
-         (error 
+         (error
           (unless (funcall gnus-agent-confirmation-function
                            (format "Error (%s).  Continue? " err))
             (error "Cannot fetch articles into the Gnus agent.")))
-         (quit 
+         (quit
           (unless (funcall gnus-agent-confirmation-function
                            (format "Quit fetching session (%s).  Continue? "
                                    err))
@@ -1123,7 +1135,7 @@ the actual number of articles toggled is returned."
                 (setq gnus-newsgroup-dependencies
                       (make-vector (length articles) 0))
                 (setq gnus-newsgroup-headers
-                      (gnus-get-newsgroup-headers-xover articles nil nil 
+                      (gnus-get-newsgroup-headers-xover articles nil nil
                                                         group))
                 ;; `gnus-agent-overview-buffer' may be killed for
                 ;; timeout reason.  If so, recreate it.
@@ -1517,7 +1529,7 @@ The following commands are available:
        (when (file-exists-p (gnus-agent-lib-file "active"))
          (with-temp-buffer
            (nnheader-insert-file-contents (gnus-agent-lib-file "active"))
-           (gnus-active-to-gnus-format 
+           (gnus-active-to-gnus-format
             gnus-command-method
             (setq orig (gnus-make-hashtable
                         (count-lines (point-min) (point-max))))))
@@ -1535,8 +1547,8 @@ The following commands are available:
                      (if (numberp fetch-date)
                          (>  fetch-date day)
                        ;; History file is corrupted.
-                       (gnus-message 
-                        5 
+                       (gnus-message
+                        5
                         (format "File %s is corrupted!"
                                 (gnus-agent-lib-file "history")))
                        (sit-for 1)
@@ -1593,7 +1605,7 @@ The following commands are available:
                                 (or (not (numberp
                                           (setq art (read (current-buffer)))))
                                     (< art article)))
-                      (if (and (numberp art) 
+                      (if (and (numberp art)
                                (file-exists-p
                                 (gnus-agent-article-name
                                  (number-to-string art) group)))
index c2d3159..699361b 100644 (file)
@@ -227,25 +227,25 @@ asynchronously.    The compressed face will be piped to this command."
 
 (defcustom gnus-article-banner-alist nil
   "Banner alist for stripping.
-For example, 
+For example,
      ((egroups . \"^[ \\t\\n]*-------------------+\\\\( eGroups Sponsor -+\\\\)?....\\n\\\\(.+\\n\\\\)+\"))"
   :version "21.1"
   :type '(repeat (cons symbol regexp))
   :group 'gnus-article-washing)
 
-(gnus-define-group-parameter 
+(gnus-define-group-parameter
  banner
  :variable-document
  "Alist of regexps (to match group names) and banner."
  :variable-group gnus-article-washing
- :parameter-type 
+ :parameter-type
  '(choice :tag "Banner"
          :value nil
          (const :tag "Remove signature" signature)
          (symbol :tag "Item in `gnus-article-banner-alist'" none)
          regexp
          (const :tag "None" nil))
- :parameter-document 
+ :parameter-document
  "If non-nil, specify how to remove `banners' from articles.
 
 Symbol `signature' means to remove signatures delimited by
@@ -470,6 +470,13 @@ The following additional specs are available:
   :type 'hook
   :group 'gnus-article-various)
 
+(when (featurep 'xemacs)
+  ;; Extracted from gnus-xmas-define in order to preserve user settings
+  (when (fboundp 'turn-off-scroll-in-place)
+    (add-hook 'gnus-article-mode-hook 'turn-off-scroll-in-place))
+  ;; Extracted from gnus-xmas-redefine in order to preserve user settings
+  (add-hook 'gnus-article-mode-hook 'gnus-xmas-article-menu-add))
+
 (defcustom gnus-article-menu-hook nil
   "*Hook run after the creation of the article mode menu."
   :type 'hook
@@ -677,17 +684,17 @@ be added below it (otherwise)."
 (defcustom gnus-article-mime-match-handle-function 'undisplayed-alternative
   "Function called with a MIME handle as the argument.
 This is meant for people who want to view first matched part.
-For `undisplayed-alternative' (default), the first undisplayed 
-part or alternative part is used.  For `undisplayed', the first 
-undisplayed part is used.  For a function, the first part which 
+For `undisplayed-alternative' (default), the first undisplayed
+part or alternative part is used.  For `undisplayed', the first
+undisplayed part is used.  For a function, the first part which
 the function return `t' is used.  For `nil', the first part is
 used."
   :version "21.1"
   :group 'gnus-article-mime
-  :type '(choice 
+  :type '(choice
          (item :tag "first" :value nil)
          (item :tag "undisplayed" :value undisplayed)
-         (item :tag "undisplayed or alternative" 
+         (item :tag "undisplayed or alternative"
                :value undisplayed-alternative)
          (function)))
 
@@ -772,7 +779,7 @@ See the manual for details."
   :type gnus-article-treat-head-custom)
 (put 'gnus-treat-buttonize-head 'highlight t)
 
-(defcustom gnus-treat-emphasize 
+(defcustom gnus-treat-emphasize
   (and (or window-system
           (featurep 'xemacs)
           (>= (string-to-number emacs-version) 21))
@@ -974,7 +981,7 @@ See the manual for details."
   :type gnus-article-treat-custom)
 (put 'gnus-treat-overstrike 'highlight t)
 
-(defcustom gnus-treat-display-xface 
+(defcustom gnus-treat-display-xface
   (and (or (and (fboundp 'image-type-available-p)
                (image-type-available-p 'xbm)
                (string-match "^0x" (shell-command-to-string "uncompface")))
@@ -987,7 +994,7 @@ See the manual for details."
   :type gnus-article-treat-head-custom)
 (put 'gnus-treat-display-xface 'highlight t)
 
-(defcustom gnus-treat-display-smileys 
+(defcustom gnus-treat-display-smileys
   (if (or (and (featurep 'xemacs)
               (featurep 'xpm))
          (and (fboundp 'image-type-available-p)
@@ -1119,7 +1126,7 @@ It is a string, such as \"PGP\". If nil, ask user."
 (defvar gnus-article-mode-syntax-table
   (let ((table (copy-syntax-table text-mode-syntax-table)))
     ;; This causes the citation match run O(2^n).
-    ;; (modify-syntax-entry ?- "w" table) 
+    ;; (modify-syntax-entry ?- "w" table)
     (modify-syntax-entry ?> ")" table)
     (modify-syntax-entry ?< "(" table)
     table)
@@ -1586,7 +1593,7 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")."
     (let ((inhibit-point-motion-hooks t)
          buffer-read-only
          (mail-parse-charset gnus-newsgroup-charset)
-         (mail-parse-ignored-charsets 
+         (mail-parse-ignored-charsets
           (save-excursion (set-buffer gnus-summary-buffer)
                           gnus-newsgroup-ignored-charsets)))
       (mail-decode-encoded-word-region (point-min) (point-max)))))
@@ -1598,7 +1605,7 @@ If PROMPT (the prefix), prompt for a coding system to use."
   (let ((inhibit-point-motion-hooks t) (case-fold-search t)
        buffer-read-only
        (mail-parse-charset gnus-newsgroup-charset)
-       (mail-parse-ignored-charsets 
+       (mail-parse-ignored-charsets
         (save-excursion (condition-case nil
                             (set-buffer gnus-summary-buffer)
                           (error))
@@ -1619,7 +1626,7 @@ If PROMPT (the prefix), prompt for a coding system to use."
            format (and ctl (mail-content-type-get ctl 'format)))
       (when cte
        (setq cte (mail-header-strip cte)))
-      (if (and ctl (not (string-match "/" (car ctl)))) 
+      (if (and ctl (not (string-match "/" (car ctl))))
          (setq ctl nil))
       (goto-char (point-max)))
     (forward-line 1)
@@ -1641,7 +1648,7 @@ If PROMPT (the prefix), prompt for a coding system to use."
   "Remove encoded-word encoding from headers."
   (let ((inhibit-point-motion-hooks t)
        (mail-parse-charset gnus-newsgroup-charset)
-       (mail-parse-ignored-charsets 
+       (mail-parse-ignored-charsets
         (save-excursion (condition-case nil
                             (set-buffer gnus-summary-buffer)
                           (error))
@@ -1663,14 +1670,14 @@ or not."
            (setq type
                  (gnus-fetch-field "content-transfer-encoding"))
            (let* ((ct (gnus-fetch-field "content-type"))
-                  (ctl (and ct 
+                  (ctl (and ct
                             (ignore-errors
                               (mail-header-parse-content-type ct)))))
              (setq charset (and ctl
                                 (mail-content-type-get ctl 'charset)))
              (if (stringp charset)
                  (setq charset (intern (downcase charset)))))))
-      (unless charset 
+      (unless charset
        (setq charset gnus-newsgroup-charset))
       (when (or force
                (and type (let ((case-fold-search t))
@@ -1690,14 +1697,14 @@ If FORCE, decode the article whether it is marked as base64 not."
            (setq type
                  (gnus-fetch-field "content-transfer-encoding"))
            (let* ((ct (gnus-fetch-field "content-type"))
-                  (ctl (and ct 
+                  (ctl (and ct
                             (ignore-errors
                               (mail-header-parse-content-type ct)))))
              (setq charset (and ctl
                                 (mail-content-type-get ctl 'charset)))
              (if (stringp charset)
                  (setq charset (intern (downcase charset)))))))
-      (unless charset 
+      (unless charset
        (setq charset gnus-newsgroup-charset))
       (when (or force
                (and type (let ((case-fold-search t))
@@ -1729,14 +1736,14 @@ If FORCE, decode the article whether it is marked as base64 not."
       (if (gnus-buffer-live-p gnus-original-article-buffer)
          (with-current-buffer gnus-original-article-buffer
            (let* ((ct (gnus-fetch-field "content-type"))
-                  (ctl (and ct 
+                  (ctl (and ct
                             (ignore-errors
                               (mail-header-parse-content-type ct)))))
              (setq charset (and ctl
                                 (mail-content-type-get ctl 'charset)))
              (if (stringp charset)
                  (setq charset (intern (downcase charset)))))))
-      (unless charset 
+      (unless charset
        (setq charset gnus-newsgroup-charset))
       (article-goto-body)
       (save-window-excursion
@@ -1763,7 +1770,7 @@ The `gnus-list-identifiers' variable specifies what to do."
          (when regexp
            (goto-char (point-min))
            (when (re-search-forward
-                  (concat "^Subject: +\\(\\(\\(Re: +\\)?\\(" regexp 
+                  (concat "^Subject: +\\(\\(\\(Re: +\\)?\\(" regexp
                           " *\\)\\)+\\(Re: +\\)?\\)")
                   nil t)
              (let ((s (or (match-string 3) (match-string 5))))
@@ -2076,9 +2083,9 @@ means show, 0 means toggle."
 Originally it is hide instead of DUMMY."
   (let ((buffer-read-only nil)
        (inhibit-point-motion-hooks t))
-    (gnus-remove-text-properties-when 
+    (gnus-remove-text-properties-when
      'article-type type
-     (point-min) (point-max) 
+     (point-min) (point-max)
      (cons 'article-type (cons type
                               gnus-hidden-properties)))))
 
@@ -2166,7 +2173,7 @@ should replace the \"Date:\" one, or should be added below it."
      ((eq type 'local)
       (let ((tz (car (current-time-zone time))))
        (format "Date: %s %s%02d%02d" (current-time-string time)
-               (if (> tz 0) "+" "-") (/ (abs tz) 3600) 
+               (if (> tz 0) "+" "-") (/ (abs tz) 3600)
                (/ (% (abs tz) 3600) 60))))
      ;; Convert to Universal Time.
      ((eq type 'ut)
@@ -2199,7 +2206,7 @@ should replace the \"Date:\" one, or should be added below it."
         "Date: "
         (format-time-string "%Y%m%dT%H%M%S" time)
         (format "%s%02d%02d"
-                (if (> tz 0) "+" "-") (/ (abs tz) 3600) 
+                (if (> tz 0) "+" "-") (/ (abs tz) 3600)
                 (/ (% (abs tz) 3600) 60)))))
      ;; Do an X-Sent lapsed format.
      ((eq type 'lapsed)
@@ -2344,10 +2351,10 @@ This format is defined by the `gnus-article-time-format' variable."
   (interactive (gnus-article-hidden-arg))
   (unless (gnus-article-check-hidden-text 'emphasis arg)
     (save-excursion
-      (let ((alist (or 
+      (let ((alist (or
                    (condition-case nil
-                       (with-current-buffer gnus-summary-buffer 
-                         gnus-article-emphasis-alist) 
+                       (with-current-buffer gnus-summary-buffer
+                         gnus-article-emphasis-alist)
                      (error))
                    gnus-emphasis-alist))
            (buffer-read-only nil)
@@ -2379,8 +2386,8 @@ This format is defined by the `gnus-article-time-format' variable."
     (let ((name (and gnus-newsgroup-name
                     (gnus-group-real-name gnus-newsgroup-name))))
       (make-local-variable 'gnus-article-emphasis-alist)
-      (setq gnus-article-emphasis-alist 
-           (nconc 
+      (setq gnus-article-emphasis-alist
+           (nconc
             (let ((alist gnus-group-highlight-words-alist) elem highlight)
               (while (setq elem (pop alist))
                 (when (and name (string-match (car elem) name))
@@ -2389,7 +2396,7 @@ This format is defined by the `gnus-article-time-format' variable."
               highlight)
             (copy-sequence highlight-words)
             (if gnus-newsgroup-name
-                (copy-sequence (gnus-group-find-parameter 
+                (copy-sequence (gnus-group-find-parameter
                                 gnus-newsgroup-name 'highlight-words t)))
             gnus-emphasis-alist)))))
 
@@ -2679,7 +2686,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is
       (let ((sig (with-current-buffer gnus-original-article-buffer
                   (gnus-fetch-field "X-PGP-Sig")))
            items info headers)
-       (when (and sig 
+       (when (and sig
                   mml2015-use
                   (mml2015-clear-verify-function))
          (with-temp-buffer
@@ -2690,7 +2697,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is
                  (case-fold-search t))
              ;; Don't verify multiple headers.
              (setq headers (mapconcat (lambda (header)
-                                        (concat header ": " 
+                                        (concat header ": "
                                                 (mail-fetch-field header) "\n"))
                                       (split-string (nth 1 items) ",") "")))
            (delete-region (point-min) (point-max))
@@ -2712,10 +2719,10 @@ If variable `gnus-use-long-file-name' is non-nil, it is
              (let ((coding-system-for-write (or gnus-newsgroup-charset
                                                 'iso-8859-1)))
                (funcall (mml2015-clear-verify-function)))
-             (setq info 
-                   (or (mm-handle-multipart-ctl-parameter 
+             (setq info
+                   (or (mm-handle-multipart-ctl-parameter
                         mm-security-handle 'gnus-details)
-                       (mm-handle-multipart-ctl-parameter 
+                       (mm-handle-multipart-ctl-parameter
                         mm-security-handle 'gnus-info)))))
          (when info
            (let (buffer-read-only bface eface)
@@ -2840,7 +2847,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is
 (substitute-key-definition
  'undefined 'gnus-article-read-summary-keys gnus-article-mode-map)
 
-(eval-when-compile 
+(eval-when-compile
   (defvar gnus-article-commands-menu))
 
 (defun gnus-article-make-menu-bar ()
@@ -2959,7 +2966,7 @@ commands:
            (mm-destroy-parts gnus-article-mime-handles)
            (setq gnus-article-mime-handles nil))
          ;; Set it to nil in article-buffer!
-         (setq gnus-article-mime-handle-alist nil) 
+         (setq gnus-article-mime-handle-alist nil)
          (buffer-disable-undo)
          (setq buffer-read-only t)
          (unless (eq major-mode 'gnus-article-mode)
@@ -3188,7 +3195,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
     (set-buffer gnus-article-buffer)
     (let ((handles (or handles gnus-article-mime-handles))
          (mail-parse-charset gnus-newsgroup-charset)
-         (mail-parse-ignored-charsets 
+         (mail-parse-ignored-charsets
           (with-current-buffer gnus-summary-buffer
             gnus-newsgroup-ignored-charsets)))
       (when handles
@@ -3203,7 +3210,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
   "Save the MIME part under point then replace it with an external body."
   (interactive)
   (gnus-article-check-buffer)
-  (let* ((data (get-text-property (point) 'gnus-data)) 
+  (let* ((data (get-text-property (point) 'gnus-data))
         (file (and data (mm-save-part data)))
         param)
     (when file
@@ -3217,17 +3224,17 @@ If ALL-HEADERS is non-nil, no headers are hidden."
        (insert "Content-Transfer-Encoding: binary\n")
        (insert "\n"))
       (setcdr data
-             (cdr (mm-make-handle nil 
+             (cdr (mm-make-handle nil
                                   `("message/external-body"
                                     (access-type . "LOCAL-FILE")
                                     (name . ,file)))))
       (set-buffer gnus-summary-buffer)
       (gnus-article-edit-article
-       `(lambda () 
+       `(lambda ()
           (erase-buffer)
-          (let ((mail-parse-charset (or gnus-article-charset 
+          (let ((mail-parse-charset (or gnus-article-charset
                                         ',gnus-newsgroup-charset))
-                (mail-parse-ignored-charsets 
+                (mail-parse-ignored-charsets
                  (or gnus-article-ignored-charsets
                      ',gnus-newsgroup-ignored-charsets))
                 (mbl mml-buffer-list))
@@ -3245,17 +3252,17 @@ If ALL-HEADERS is non-nil, no headers are hidden."
                                        ',gnus-newsgroup-charset))
                (message-options message-options)
                (message-options-set-recipient)
-               (mail-parse-ignored-charsets  
+               (mail-parse-ignored-charsets
                 (or gnus-article-ignored-charsets
                     ',gnus-newsgroup-ignored-charsets)))
           (mml-to-mime)
           (mml-destroy-buffers)
-          (remove-hook 'kill-buffer-hook 
+          (remove-hook 'kill-buffer-hook
                        'mml-destroy-buffers t)
           (kill-local-variable 'mml-buffer-list))
          (gnus-summary-edit-article-done
           ,(or (mail-header-references gnus-current-headers) "")
-          ,(gnus-group-read-only-p) 
+          ,(gnus-group-read-only-p)
           ,gnus-summary-buffer no-highlight))))))
 
 (defun gnus-mime-save-part ()
@@ -3321,7 +3328,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
   (gnus-article-check-buffer)
   (let* ((handle (or handle (get-text-property (point) 'gnus-data)))
         (contents (and handle (mm-get-part handle)))
-        (base (and handle 
+        (base (and handle
                    (file-name-nondirectory
                     (or
                      (mail-content-type-get (mm-handle-type handle) 'name)
@@ -3361,13 +3368,13 @@ If ALL-HEADERS is non-nil, no headers are hidden."
          (if (mm-handle-undisplayer handle)
              (mm-remove-part handle))
          (setq charset
-               (or (cdr (assq arg 
+               (or (cdr (assq arg
                               gnus-summary-show-article-charset-alist))
                    (read-coding-system "Charset: ")))))
        (forward-line 2)
        (mm-insert-inline handle
-                         (if (and charset 
-                                  (setq charset (mm-charset-to-coding-system 
+                         (if (and charset
+                                  (setq charset (mm-charset-to-coding-system
                                                  charset))
                                   (not (eq charset 'ascii)))
                              (mm-decode-coding-string contents charset)
@@ -3386,7 +3393,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
       (if (mm-handle-undisplayer handle)
          (mm-remove-part handle))
       (let ((gnus-newsgroup-charset
-            (or (cdr (assq arg 
+            (or (cdr (assq arg
                            gnus-summary-show-article-charset-alist))
                 (read-coding-system "Charset: ")))
          (gnus-newsgroup-ignored-charsets 'gnus-all))
@@ -3400,7 +3407,7 @@ If ALL-HEADERS is non-nil, no headers are hidden."
         (mm-user-display-methods nil)
         (mm-inlined-types nil)
         (mail-parse-charset gnus-newsgroup-charset)
-        (mail-parse-ignored-charsets 
+        (mail-parse-ignored-charsets
          (save-excursion (set-buffer gnus-summary-buffer)
                          gnus-newsgroup-ignored-charsets)))
     (when handle
@@ -3417,7 +3424,7 @@ In no internal viewer is available, use an external viewer."
         (mm-inlined-types '(".*"))
         (mm-inline-large-images t)
         (mail-parse-charset gnus-newsgroup-charset)
-        (mail-parse-ignored-charsets 
+        (mail-parse-ignored-charsets
          (save-excursion (set-buffer gnus-summary-buffer)
                          gnus-newsgroup-ignored-charsets)))
     (when handle
@@ -3482,10 +3489,10 @@ In no internal viewer is available, use an external viewer."
   (if condition
       (let ((alist gnus-article-mime-handle-alist) ihandle n)
        (while (setq ihandle (pop alist))
-         (if (and (cond 
+         (if (and (cond
                    ((functionp condition)
                     (funcall condition (cdr ihandle)))
-                   ((eq condition 'undisplayed) 
+                   ((eq condition 'undisplayed)
                     (not (or (mm-handle-undisplayer (cdr ihandle))
                              (equal (mm-handle-media-type (cdr ihandle))
                                     "multipart/alternative"))))
@@ -3503,7 +3510,7 @@ In no internal viewer is available, use an external viewer."
   (interactive "P")
   (save-current-buffer
     (set-buffer gnus-article-buffer)
-    (or (numberp n) (setq n (gnus-article-mime-match-handle-first 
+    (or (numberp n) (setq n (gnus-article-mime-match-handle-first
                             gnus-article-mime-match-handle-function)))
     (when (> n (length gnus-article-mime-handle-alist))
       (error "No such part"))
@@ -3528,7 +3535,7 @@ In no internal viewer is available, use an external viewer."
     (prog1
        (let ((window (selected-window))
              (mail-parse-charset gnus-newsgroup-charset)
-             (mail-parse-ignored-charsets 
+             (mail-parse-ignored-charsets
               (save-excursion (set-buffer gnus-summary-buffer)
                               gnus-newsgroup-ignored-charsets)))
          (save-excursion
@@ -3601,7 +3608,7 @@ In no internal viewer is available, use an external viewer."
      gnus-mime-button-line-format gnus-mime-button-line-format-alist
      `(keymap ,gnus-mime-button-map
              ,@(if (>= (string-to-number emacs-version) 21)
-                   nil 
+                   nil
                  (list 'local-map gnus-mime-button-map))
              gnus-callback gnus-mm-display-part
              gnus-part ,gnus-tmp-id
@@ -3710,7 +3717,7 @@ In no internal viewer is available, use an external viewer."
     ;;;!!!to the first part.
     ;;(gnus-mime-display-part (cadr handle))
     ;;;!!! Most multipart/related is an HTML message plus images.
-    ;;;!!! Unfortunately we are unable to let W3 display those 
+    ;;;!!! Unfortunately we are unable to let W3 display those
     ;;;!!! included images, so we just display it as a mixed multipart.
     ;;(gnus-mime-display-mixed (cdr handle))
     ;;;!!! No, w3 can display everything just fine.
@@ -3766,8 +3773,8 @@ In no internal viewer is available, use an external viewer."
            ;(gnus-article-insert-newline)
            (gnus-insert-mime-button
             handle id (list (or display (and not-attachment text))))
-           (gnus-article-insert-newline) 
-           ;(gnus-article-insert-newline) 
+           (gnus-article-insert-newline)
+           ;(gnus-article-insert-newline)
            ;; Remember modify the number of forward lines.
            (setq move t))
          (setq beg (point))
@@ -3777,7 +3784,7 @@ In no internal viewer is available, use an external viewer."
              (forward-line -1)
              (setq beg (point)))
            (let ((mail-parse-charset gnus-newsgroup-charset)
-                 (mail-parse-ignored-charsets 
+                 (mail-parse-ignored-charsets
                   (save-excursion (condition-case ()
                                       (set-buffer gnus-summary-buffer)
                                     (error))
@@ -3796,7 +3803,7 @@ In no internal viewer is available, use an external viewer."
            (save-restriction
              (narrow-to-region beg (point))
              (gnus-treat-article
-              nil id 
+              nil id
               (gnus-article-mime-total-parts)
               (mm-handle-media-type handle)))))))))
 
@@ -3894,7 +3901,7 @@ In no internal viewer is available, use an external viewer."
          (if (stringp (car preferred))
              (gnus-display-mime preferred)
            (let ((mail-parse-charset gnus-newsgroup-charset)
-                 (mail-parse-ignored-charsets 
+                 (mail-parse-ignored-charsets
                   (save-excursion (set-buffer gnus-summary-buffer)
                                   gnus-newsgroup-ignored-charsets)))
              (mm-display-part preferred)
@@ -4133,7 +4140,7 @@ Argument LINES specifies lines to be scrolled down."
         (setq keys (if (featurep 'xemacs)
                       (events-to-keys (read-key-sequence nil))
                     (read-key-sequence nil)))))
-                    
+
     (message "")
 
     (if (or (member keys nosaves)
@@ -4339,7 +4346,7 @@ If given a prefix, show the hidden text instead."
           ((or (stringp article)
                (numberp article))
            (let ((gnus-override-method gnus-override-method)
-                 (methods (and (stringp article) 
+                 (methods (and (stringp article)
                                gnus-refer-article-method))
                  result
                  (buffer-read-only nil))
@@ -4359,7 +4366,7 @@ If given a prefix, show the hidden text instead."
                  (gnus-check-group-server))
                (when (gnus-request-article article group (current-buffer))
                  (when (numberp article)
-                   (gnus-async-prefetch-next group article 
+                   (gnus-async-prefetch-next group article
                                              gnus-summary-buffer)
                    (when gnus-keep-backlog
                      (gnus-backlog-enter-article
@@ -5181,11 +5188,11 @@ For example:
 
 (defun gnus-article-encrypt-body (protocol &optional n)
   "Encrypt the article body."
-  (interactive 
+  (interactive
    (list
     (or gnus-article-encrypt-protocol
        (completing-read "Encrypt protocol: "
-                        gnus-article-encrypt-protocol-alist 
+                        gnus-article-encrypt-protocol-alist
                         nil t))
     current-prefix-arg))
   (let ((func (cdr (assoc protocol gnus-article-encrypt-protocol-alist))))
@@ -5212,7 +5219,7 @@ For example:
          (let* ((buffer-read-only nil)
                 (headers
                  (mapcar (lambda (field)
-                           (and (save-restriction 
+                           (and (save-restriction
                                   (message-narrow-to-head)
                                   (goto-char (point-min))
                                   (search-forward field nil t))
@@ -5290,7 +5297,7 @@ For example:
   (mm-remove-parts (cdr handle))
   (let ((region (mm-handle-multipart-ctl-parameter handle 'gnus-region))
        buffer-read-only)
-    (when region 
+    (when region
       (delete-region (car region) (cdr region))
       (set-marker (car region) nil)
       (set-marker (cdr region) nil)))
@@ -5311,7 +5318,7 @@ For example:
     (if details
        (if gnus-mime-security-show-details-inline
            (let ((gnus-mime-security-button-pressed t)
-                 (gnus-mime-security-button-line-format 
+                 (gnus-mime-security-button-line-format
                   (get-text-property (point) 'gnus-line-format))
                buffer-read-only)
              (forward-char -1)
@@ -5320,9 +5327,9 @@ For example:
                (forward-char -1))
              (forward-char)
              (delete-region (point)
-                            (or (text-property-not-all 
+                            (or (text-property-not-all
                                  (point) (point-max)
-                               'gnus-line-format   
+                               'gnus-line-format
                                gnus-mime-security-button-line-format)
                                 (point-max)))
              (gnus-insert-mime-security-button handle))
@@ -5346,7 +5353,7 @@ For example:
 (defun gnus-insert-mime-security-button (handle &optional displayed)
   (let* ((protocol (mm-handle-multipart-ctl-parameter handle 'protocol))
         (gnus-tmp-type
-         (concat 
+         (concat
           (or (nth 2 (assoc protocol mm-verify-function-alist))
               (nth 2 (assoc protocol mm-decrypt-function-alist))
               "Unknown")
@@ -5363,20 +5370,20 @@ For example:
     (setq gnus-tmp-details
          (if gnus-tmp-details
              (concat "\n" gnus-tmp-details) ""))
-    (setq gnus-tmp-pressed-details 
+    (setq gnus-tmp-pressed-details
          (if gnus-mime-security-button-pressed gnus-tmp-details ""))
     (unless (bolp)
       (insert "\n"))
     (setq b (point))
     (gnus-eval-format
-     gnus-mime-security-button-line-format 
+     gnus-mime-security-button-line-format
      gnus-mime-security-button-line-format-alist
      `(keymap ,gnus-mime-security-button-map
              ,@(if (>= (string-to-number emacs-version) 21)
                    nil ;; XEmacs doesn't care
                  (list 'local-map gnus-mime-security-button-map))
              gnus-callback gnus-mime-security-press-button
-             gnus-line-format ,gnus-mime-security-button-line-format 
+             gnus-line-format ,gnus-mime-security-button-line-format
              article-type annotation
              gnus-data ,handle))
     (setq e (point))
@@ -5402,11 +5409,11 @@ For example:
     (gnus-mime-display-mixed (cdr handle))
     (unless (bolp)
       (insert "\n"))
-    (let ((gnus-mime-security-button-line-format 
+    (let ((gnus-mime-security-button-line-format
           gnus-mime-security-button-end-line-format))
       (gnus-insert-mime-security-button handle))
     (mm-set-handle-multipart-parameter
-     handle 'gnus-region 
+     handle 'gnus-region
      (cons (set-marker (make-marker) (point-min))
           (set-marker (make-marker) (point-max))))))
 
index e59b72b..387fecf 100644 (file)
@@ -206,6 +206,11 @@ with some simple extensions:
   :options '(gnus-topic-mode)
   :type 'hook)
 
+;; Extracted from gnus-xmas-redefine in order to preserve user settings
+(when (featurep 'xemacs)
+  (add-hook 'gnus-group-mode-hook 'gnus-xmas-group-menu-add)
+  (add-hook 'gnus-group-mode-hook 'gnus-xmas-setup-group-toolbar))
+
 (defcustom gnus-group-menu-hook nil
   "Hook run after the creation of the group mode menu."
   :group 'gnus-group-various
@@ -994,7 +999,7 @@ The following commands are available:
   (let ((item (assoc method gnus-group-name-charset-method-alist))
        (alist gnus-group-name-charset-group-alist)
        result)
-    (if item 
+    (if item
        (cdr item)
       (while (setq item (pop alist))
        (if (string-match (car item) group)
@@ -1088,7 +1093,7 @@ If ALL (the prefix), also list groups that have no unread articles."
   (or (and gnus-group-listed-groups
           (null gnus-group-list-option)
           (member group gnus-group-listed-groups))
-      (cond 
+      (cond
        ((null gnus-group-listed-groups) test)
        ((null gnus-group-list-option) test)
        (t (and (member group gnus-group-listed-groups)
@@ -1120,10 +1125,10 @@ if it is a string, only list groups matching REGEXP."
              params (gnus-info-params info)
              newsrc (cdr newsrc)
              unread (car (gnus-gethash group gnus-newsrc-hashtb)))
-       (if not-in-list 
+       (if not-in-list
            (setq not-in-list (delete group not-in-list)))
-       (and 
-        (gnus-group-prepare-logic 
+       (and
+        (gnus-group-prepare-logic
          group
          (and unread           ; This group might be unchecked
               (or (not (stringp regexp))
@@ -1137,9 +1142,9 @@ if it is a string, only list groups matching REGEXP."
                (t
                 (or
                  (if (eq unread t)     ; Unactivated?
-                     gnus-group-list-inactive-groups 
+                     gnus-group-list-inactive-groups
                                        ; We list unactivated
-                   (> unread 0))       
+                   (> unread 0))
                                        ; We list groups with unread articles
                  (and gnus-list-groups-with-ticked-articles
                       (cdr (assq 'tick (gnus-info-marks info))))
@@ -1152,22 +1157,22 @@ if it is a string, only list groups matching REGEXP."
         (gnus-group-insert-group-line
          group (gnus-info-level info)
          (gnus-info-marks info) unread (gnus-info-method info)))))
-      
+
     ;; List dead groups.
     (if (or gnus-group-listed-groups
-           (and (>= level gnus-level-zombie) 
+           (and (>= level gnus-level-zombie)
                 (<= lowest gnus-level-zombie)))
        (gnus-group-prepare-flat-list-dead
         (setq gnus-zombie-list (sort gnus-zombie-list 'string<))
         gnus-level-zombie ?Z
         regexp))
-    (if not-in-list 
+    (if not-in-list
        (dolist (group gnus-zombie-list)
          (setq not-in-list (delete group not-in-list))))
     (if (or gnus-group-listed-groups
            (and (>= level gnus-level-killed) (<= lowest gnus-level-killed)))
        (gnus-group-prepare-flat-list-dead
-        (gnus-union 
+        (gnus-union
          not-in-list
          (setq gnus-killed-list (sort gnus-killed-list 'string<)))
         gnus-level-killed ?K regexp))
@@ -1184,7 +1189,7 @@ if it is a string, only list groups matching REGEXP."
   (let (group)
     (while groups
       (setq group (pop groups))
-      (when (gnus-group-prepare-logic 
+      (when (gnus-group-prepare-logic
             group
             (or (not regexp)
                 (and (stringp regexp) (string-match regexp group))
@@ -1192,14 +1197,14 @@ if it is a string, only list groups matching REGEXP."
 ;;;    (gnus-add-text-properties
 ;;;     (point) (prog1 (1+ (point))
 ;;;               (insert " " mark "     *: "
-;;;                       (gnus-group-name-decode group 
+;;;                       (gnus-group-name-decode group
 ;;;                                               (gnus-group-name-charset
-;;;                                                nil group)) 
+;;;                                                nil group))
 ;;;                       "\n"))
 ;;;     (list 'gnus-group (gnus-intern-safe group gnus-active-hashtb)
 ;;;           'gnus-unread t
 ;;;           'gnus-level level))
-       (gnus-group-insert-group-line 
+       (gnus-group-insert-group-line
         group level nil
         (let ((active (gnus-active group)))
           (if active
@@ -1257,7 +1262,7 @@ if it is a string, only list groups matching REGEXP."
                                                    gnus-tmp-method)
   "Insert a group line in the group buffer."
   (let* ((gnus-tmp-method
-         (gnus-server-get-method gnus-tmp-group gnus-tmp-method)) 
+         (gnus-server-get-method gnus-tmp-group gnus-tmp-method))
         (group-name-charset (gnus-group-name-charset gnus-tmp-method
                                                      gnus-tmp-group))
         (gnus-tmp-active (gnus-active gnus-tmp-group))
@@ -1277,13 +1282,13 @@ if it is a string, only list groups matching REGEXP."
                ((<= gnus-tmp-level gnus-level-unsubscribed) ?U)
                ((= gnus-tmp-level gnus-level-zombie) ?Z)
                (t ?K)))
-        (gnus-tmp-qualified-group 
+        (gnus-tmp-qualified-group
          (gnus-group-name-decode (gnus-group-real-name gnus-tmp-group)
                                  group-name-charset))
         (gnus-tmp-newsgroup-description
          (if gnus-description-hashtb
              (or (gnus-group-name-decode
-                  (gnus-gethash gnus-tmp-group gnus-description-hashtb) 
+                  (gnus-gethash gnus-tmp-group gnus-description-hashtb)
                   group-name-charset) "")
            ""))
         (gnus-tmp-moderated
@@ -1929,11 +1934,11 @@ If TEST-MARKED, the line must be marked."
      (test-marked
       (goto-char (point-min))
       (let (found)
-       (while (and (not found) 
+       (while (and (not found)
                    (gnus-goto-char
                     (text-property-any
                      (point) (point-max)
-                     'gnus-group 
+                     'gnus-group
                      (gnus-intern-safe group gnus-active-hashtb))))
          (if (gnus-group-mark-line-p)
              (setq found t)
@@ -2397,7 +2402,7 @@ If SOLID (the prefix), create a solid group."
            default-login 'gnus-group-warchive-login-history)
           user-mail-address))
         (method
-         `(nnwarchive ,address 
+         `(nnwarchive ,address
                       (nnwarchive-type ,(intern type))
                       (nnwarchive-login ,login))))
     (gnus-group-make-group group method)))
@@ -3279,7 +3284,7 @@ entail asking the server for the groups."
       (gnus-add-text-properties
        (point) (prog1 (1+ (point))
                 (insert "       *: "
-                        (gnus-group-name-decode group 
+                        (gnus-group-name-decode group
                                                 (gnus-group-name-charset
                                                  nil group))
                         "\n"))
@@ -3442,7 +3447,7 @@ to use."
      (lambda (group)
        (setq b (point))
        (let ((charset (gnus-group-name-charset nil (symbol-name group))))
-        (insert (format "      *: %-20s %s\n" 
+        (insert (format "      *: %-20s %s\n"
                         (gnus-group-name-decode
                          (symbol-name group) charset)
                         (gnus-group-name-decode
@@ -3836,18 +3841,18 @@ This command may read the active file."
     (setq level (prefix-numeric-value level)))
   (when (or (not level) (>= level gnus-level-zombie))
     (gnus-cache-open))
-  (funcall gnus-group-prepare-function 
+  (funcall gnus-group-prepare-function
           (or level gnus-level-subscribed)
           #'(lambda (info)
               (let ((marks (gnus-info-marks info)))
                 (assq 'cache marks)))
           lowest
           #'(lambda (group)
-              (or (gnus-gethash group 
+              (or (gnus-gethash group
                                 gnus-cache-active-hashtb)
-                  ;; Cache active file might use "." 
+                  ;; Cache active file might use "."
                   ;; instead of ":".
-                  (gnus-gethash 
+                  (gnus-gethash
                    (mapconcat 'identity
                               (split-string group ":")
                               ".")
@@ -3867,7 +3872,7 @@ This command may read the active file."
     (setq level (prefix-numeric-value level)))
   (when (or (not level) (>= level gnus-level-zombie))
     (gnus-cache-open))
-  (funcall gnus-group-prepare-function 
+  (funcall gnus-group-prepare-function
           (or level gnus-level-subscribed)
           #'(lambda (info)
               (let ((marks (gnus-info-marks info)))
@@ -3881,7 +3886,7 @@ This command may read the active file."
   "Return a list of listed groups."
   (let (point groups)
     (goto-char (point-min))
-    (while (setq point (text-property-not-all (point) (point-max) 
+    (while (setq point (text-property-not-all (point) (point-max)
                                              'gnus-group nil))
       (goto-char point)
       (push (symbol-name (get-text-property point 'gnus-group)) groups)
index dd2aa1f..2a6acc9 100644 (file)
@@ -36,7 +36,8 @@
 ;;;
 
 (defvar gnus-pick-mode nil
-  "Minor mode for providing a pick-and-read interface in Gnus summary buffers.")
+  "Minor mode for providing a pick-and-read interface in Gnus
+summary buffers.")
 
 (defcustom gnus-pick-display-summary nil
   "*Display summary while reading."
   :type 'hook
   :group 'gnus-summary-pick)
 
+(when (featurep 'xemacs)
+  (add-hook 'gnus-pick-mode-hook 'gnus-xmas-pick-menu-add))
+
 (defcustom gnus-mark-unpicked-articles-as-read nil
   "*If non-nil, mark all unpicked articles as read."
   :type 'boolean
   :group 'gnus-summary-pick)
 
 (defcustom gnus-pick-elegant-flow t
-  "If non-nil, `gnus-pick-start-reading' runs `gnus-summary-next-group' when no articles have been picked."
+  "If non-nil, `gnus-pick-start-reading' runs
+ `gnus-summary-next-group' when no articles have been picked."
   :type 'boolean
   :group 'gnus-summary-pick)
 
@@ -418,6 +423,11 @@ Two predefined functions are available:
   :type 'hook
   :group 'gnus-summary-tree)
 
+(when (featurep 'xemacs)
+  (add-hook 'gnus-tree-mode-hook 'gnus-xmas-tree-menu-add)
+  (add-hook 'gnus-tree-mode-hook 'gnus-xmas-switch-horizontal-scrollbar-off))
+
+
 ;;; Internal variables.
 
 (defvar gnus-tree-line-format-alist
index c1dd161..beae84b 100644 (file)
@@ -650,6 +650,13 @@ This hook is run before any variables are set in the summary buffer."
   :group 'gnus-summary-various
   :type 'hook)
 
+;; Extracted from gnus-xmas-redefine in order to preserve user settings
+(when (featurep 'xemacs)
+  (add-hook 'gnus-summary-mode-hook 'gnus-xmas-summary-menu-add)
+  (add-hook 'gnus-summary-mode-hook 'gnus-xmas-setup-summary-toolbar)
+  (add-hook 'gnus-summary-mode-hook
+           'gnus-xmas-switch-horizontal-scrollbar-off))
+
 (defcustom gnus-summary-menu-hook nil
   "*Hook run after the creation of the summary mode menu."
   :group 'gnus-summary-visual
@@ -3814,8 +3821,8 @@ If LINE, insert the rebuilt thread starting on line LINE."
       threads
     (gnus-message 8 "Sorting threads...")
     (prog1
-       (gnus-sort-threads-1 
-        threads 
+       (gnus-sort-threads-1
+        threads
         (gnus-make-sort-function gnus-thread-sort-functions))
       (gnus-message 8 "Sorting threads...done"))))
 
@@ -4252,7 +4259,7 @@ or a straight list of headers."
                    gnus-list-identifiers
                  (mapconcat 'identity gnus-list-identifiers " *\\|"))))
     (dolist (header gnus-newsgroup-headers)
-      (when (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp 
+      (when (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp
                                  " *\\)\\)+\\(Re: +\\)?\\)")
                          (mail-header-subject header))
        (mail-header-set-subject
@@ -4474,7 +4481,7 @@ If SELECT-ARTICLES, only select those articles from GROUP."
             (gnus-sorted-complement gnus-newsgroup-unreads articles)))
       (when gnus-alter-articles-to-read-function
        (setq gnus-newsgroup-unreads
-             (sort 
+             (sort
               (funcall gnus-alter-articles-to-read-function
                        gnus-newsgroup-name gnus-newsgroup-unreads)
               '<)))
@@ -4586,7 +4593,7 @@ If SELECT-ARTICLES, only select those articles from GROUP."
 
        (unless (memq (cdr type) uncompressed)
          (setq list (gnus-compress-sequence (set symbol (sort list '<)) t)))
-       
+
        (when (gnus-check-backend-function
               'request-set-mark gnus-newsgroup-name)
          ;; propagate flags to server, with the following exceptions:
@@ -4605,7 +4612,7 @@ If SELECT-ARTICLES, only select those articles from GROUP."
                (push (list add 'add (list (cdr type))) delta-marks))
              (when del
                (push (list del 'del (list (cdr type))) delta-marks)))))
-         
+
        (when list
          (push (cons (cdr type) list) newmarked)))
 
@@ -4613,7 +4620,7 @@ If SELECT-ARTICLES, only select those articles from GROUP."
        (unless (gnus-check-group gnus-newsgroup-name)
          (error "Can't open server for %s" gnus-newsgroup-name))
        (gnus-request-set-mark gnus-newsgroup-name delta-marks))
-         
+
       ;; Enter these new marks into the info of the group.
       (if (nthcdr 3 info)
          (setcar (nthcdr 3 info) newmarked)
@@ -4645,9 +4652,9 @@ If WHERE is `summary', the summary mode line format will be used."
        (let* ((mformat (symbol-value
                         (intern
                          (format "gnus-%s-mode-line-format-spec" where))))
-              (gnus-tmp-group-name (gnus-group-name-decode 
+              (gnus-tmp-group-name (gnus-group-name-decode
                                     gnus-newsgroup-name
-                                    (gnus-group-name-charset 
+                                    (gnus-group-name-charset
                                      nil
                                      gnus-newsgroup-name)))
               (gnus-tmp-article-number (or gnus-current-article 0))
@@ -7111,8 +7118,8 @@ to guess what the document format is."
        ;; the parent article.
        (when (setq to-address (or (message-fetch-field "reply-to")
                                   (message-fetch-field "from")))
-         (setq params (append 
-                       (list (cons 'to-address 
+         (setq params (append
+                       (list (cons 'to-address
                                    (funcall gnus-decode-encoded-word-function
                                             to-address))))))
        (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*"))
@@ -8012,19 +8019,19 @@ delete these instead."
   "Edit the current article.
 This will have permanent effect only in mail groups.
 If ARG is nil, edit the decoded articles.
-If ARG is 1, edit the raw articles. 
+If ARG is 1, edit the raw articles.
 If ARG is 2, edit the raw articles even in read-only groups.
 If ARG is 3, edit the articles with the current handles.
 Otherwise, allow editing of articles even in read-only
 groups."
   (interactive "P")
   (let (force raw current-handles)
-    (cond 
+    (cond
      ((null arg))
      ((eq arg 1) (setq raw t))
      ((eq arg 2) (setq raw t
                       force t))
-     ((eq arg 3) (setq current-handles 
+     ((eq arg 3) (setq current-handles
                       (and (gnus-buffer-live-p gnus-article-buffer)
                            (with-current-buffer gnus-article-buffer
                              (prog1
@@ -8048,8 +8055,8 @@ groups."
        (if (equal gnus-newsgroup-name "nndraft:drafts")
            (setq raw t))
        (gnus-article-edit-article
-        (if raw 'ignore 
-          `(lambda () 
+        (if raw 'ignore
+          `(lambda ()
              (let ((mbl mml-buffer-list))
                (setq mml-buffer-list nil)
                (mime-to-mml ,'current-handles)
@@ -8062,17 +8069,17 @@ groups."
            (let ((mail-parse-charset ',gnus-newsgroup-charset)
                  (message-options message-options)
                  (message-options-set-recipient)
-                 (mail-parse-ignored-charsets 
+                 (mail-parse-ignored-charsets
                   ',gnus-newsgroup-ignored-charsets))
-             ,(if (not raw) '(progn 
+             ,(if (not raw) '(progn
                                (mml-to-mime)
                                (mml-destroy-buffers)
-                               (remove-hook 'kill-buffer-hook 
+                               (remove-hook 'kill-buffer-hook
                                             'mml-destroy-buffers t)
                                (kill-local-variable 'mml-buffer-list)))
              (gnus-summary-edit-article-done
               ,(or (mail-header-references gnus-current-headers) "")
-              ,(gnus-group-read-only-p) 
+              ,(gnus-group-read-only-p)
               ,gnus-summary-buffer no-highlight))))))))
 
 (defalias 'gnus-summary-edit-article-postpone 'gnus-article-edit-exit)
@@ -8105,7 +8112,7 @@ groups."
   (let ((buf (current-buffer)))
     (with-temp-buffer
       (insert-buffer-substring buf)
-      
+
       (if (and (not read-only)
               (not (gnus-request-replace-article
                     (cdr gnus-article-current) (car gnus-article-current)
@@ -8313,7 +8320,7 @@ the actual number of articles unmarked is returned."
        ;;; !!! This is bobus.  We should find out what primary
        ;;; !!! mark we want to set.
        (gnus-summary-update-mark gnus-del-mark 'unread)))))
-       
+
 (defun gnus-summary-mark-as-expirable (n)
   "Mark N articles forward as expirable.
 If N is negative, mark backward instead.  The difference between N and
@@ -9472,12 +9479,12 @@ save those articles instead."
   "Save parts matching TYPE to DIR.
 If REVERSE, save parts that do not match TYPE."
   (interactive
-   (list (read-string "Save parts of type: " 
+   (list (read-string "Save parts of type: "
                      (or (car gnus-summary-save-parts-type-history)
                          gnus-summary-save-parts-default-mime)
                      'gnus-summary-save-parts-type-history)
         (setq gnus-summary-save-parts-last-directory
-              (read-file-name "Save to directory: " 
+              (read-file-name "Save to directory: "
                               gnus-summary-save-parts-last-directory
                               nil t))
         current-prefix-arg))
@@ -9820,7 +9827,7 @@ If REVERSE, save parts that do not match TYPE."
              `(progn
                 (gnus-info-set-marks ',info ',(gnus-info-marks info) t)
                 (gnus-info-set-read ',info ',(gnus-info-read info))
-                (gnus-get-unread-articles-in-group ',info 
+                (gnus-get-unread-articles-in-group ',info
                                                    (gnus-active ,group))
                 (gnus-group-update-group ,group t)
                 ,setmarkundo))))
@@ -9971,7 +9978,7 @@ treated as multipart/mixed."
                   mark (car lway) lway name)))
        (setq func (eval func))
        (define-key map (nth 4 lway) func)))))
-      
+
 (defun gnus-summary-make-marking-command-1 (mark way lway name)
   `(defun ,(intern
            (format "gnus-summary-put-mark-as-%s%s"
@@ -9988,7 +9995,7 @@ returned."
        name (cadr lway))
      (interactive "p")
      (gnus-summary-generic-mark n ,mark ',(nth 2 lway) ,(nth 3 lway))))
-    
+
 (defun gnus-summary-generic-mark (n mark move unread)
   "Mark N articles with MARK."
   (unless (eq major-mode 'gnus-summary-mode)
index 89bcbdc..056ffbd 100644 (file)
@@ -46,6 +46,9 @@
   :type 'hook
   :group 'gnus-topic)
 
+(when (featurep 'xemacs)
+  (add-hook 'gnus-topic-mode-hook 'gnus-xmas-topic-menu-add))
+
 (defcustom gnus-topic-line-format "%i[ %(%{%n%}%) -- %A ]%v\n"
   "Format of topic lines.
 It works along the same lines as a normal formatting string,
@@ -163,7 +166,7 @@ with some simple extensions.
   (dolist (topic (gnus-current-topics topic))
     (gnus-topic-fold t))
   (gnus-topic-goto-topic topic))
-  
+
 (defun gnus-current-topic ()
   "Return the name of the current topic."
   (let ((result
@@ -233,14 +236,14 @@ If RECURSIVE is t, return groups in its subtopics too."
        ;; Add this group to the list of visible groups.
        (push (or entry group) visible-groups)))
     (setq visible-groups (nreverse visible-groups))
-    (when recursive 
+    (when recursive
       (if (eq recursive t)
          (setq recursive (cdr (gnus-topic-find-topology topic))))
       (mapcar (lambda (topic-topology)
-               (setq visible-groups 
-                     (nconc visible-groups 
+               (setq visible-groups
+                     (nconc visible-groups
                             (gnus-topic-find-groups
-                             (caar topic-topology) 
+                             (caar topic-topology)
                              level all lowest topic-topology))))
              (cdr recursive)))
     visible-groups))
@@ -394,7 +397,7 @@ If LOWEST is non-nil, list all newsgroups of level LOWEST or higher."
   (set-buffer gnus-group-buffer)
   (let ((buffer-read-only nil)
         (lowest (or lowest 1))
-       (not-in-list 
+       (not-in-list
         (and gnus-group-listed-groups
              (copy-sequence gnus-group-listed-groups))))
 
@@ -415,11 +418,11 @@ If LOWEST is non-nil, list all newsgroups of level LOWEST or higher."
        regexp))
 
     (when (or gnus-group-listed-groups
-              (and (>= level gnus-level-killed) 
+              (and (>= level gnus-level-killed)
                    (<= lowest gnus-level-killed)))
       (gnus-group-prepare-flat-list-dead
        (gnus-union
-       (and not-in-list 
+       (and not-in-list
             (gnus-delete-if (lambda (group)
                               (< (gnus-group-level group) gnus-level-killed))
                             not-in-list))
@@ -443,7 +446,7 @@ If LOWEST is non-nil, list all newsgroups of level LOWEST or higher."
       (setq gnus-group-list-mode (cons level predicate))
       (gnus-run-hooks 'gnus-group-prepare-hook))))
 
-(defun gnus-topic-prepare-topic (topicl level &optional list-level 
+(defun gnus-topic-prepare-topic (topicl level &optional list-level
                                        predicate silent
                                        lowest regexp)
   "Insert TOPIC into the group buffer.
@@ -451,8 +454,8 @@ If SILENT, don't insert anything.  Return the number of unread
 articles in the topic and its subtopics."
   (let* ((type (pop topicl))
         (entries (gnus-topic-find-groups
-                  (car type) 
-                  (if gnus-group-listed-groups 
+                  (car type)
+                  (if gnus-group-listed-groups
                       gnus-level-killed
                     list-level)
                   (or predicate gnus-group-listed-groups
@@ -481,7 +484,7 @@ articles in the topic and its subtopics."
     ;; Insert all the groups that belong in this topic.
     (while (setq entry (pop entries))
       (when (if (stringp entry)
-               (gnus-group-prepare-logic 
+               (gnus-group-prepare-logic
                 entry
                 (and
                  (or (not gnus-group-listed-groups)
@@ -491,7 +494,7 @@ articles in the topic and its subtopics."
                                   gnus-level-zombie gnus-level-killed)))
                          (and (<= entry-level list-level)
                               (>= entry-level lowest)))))
-                 (cond 
+                 (cond
                   ((stringp regexp)
                    (string-match regexp entry))
                   ((functionp regexp)
@@ -499,7 +502,7 @@ articles in the topic and its subtopics."
                   ((null regexp) t)
                   (t nil))))
              (setq info (nth 2 entry))
-             (gnus-group-prepare-logic 
+             (gnus-group-prepare-logic
               (gnus-info-group info)
               (and (or (not gnus-group-listed-groups)
                        (let ((entry-level (gnus-info-level info)))
@@ -1191,10 +1194,10 @@ When used interactively, PARENT will be the topic under point."
   (gnus-group-list-groups)
   (gnus-topic-goto-topic topic))
 
-;; FIXME: 
-;;  1. When the marked groups are overlapped with the process 
+;; FIXME:
+;;  1. When the marked groups are overlapped with the process
 ;;     region, the behavior of move or remove is not right.
-;;  2. Can't process on several marked groups with a same name, 
+;;  2. Can't process on several marked groups with a same name,
 ;;     because gnus-group-marked only keeps one copy.
 
 (defun gnus-topic-move-group (n topic &optional copyp)
@@ -1203,7 +1206,7 @@ If COPYP, copy the groups instead."
   (interactive
    (list current-prefix-arg
         (completing-read "Move to topic: " gnus-topic-alist nil t)))
-  (let ((use-marked (and (not n) (not (gnus-region-active-p)) 
+  (let ((use-marked (and (not n) (not (gnus-region-active-p))
                         gnus-group-marked t))
        (groups (gnus-group-process-prefix n))
        (topicl (assoc topic gnus-topic-alist))
@@ -1230,7 +1233,7 @@ If COPYP, copy the groups instead."
 (defun gnus-topic-remove-group (&optional n)
   "Remove the current group from the topic."
   (interactive "P")
-  (let ((use-marked (and (not n) (not (gnus-region-active-p)) 
+  (let ((use-marked (and (not n) (not (gnus-region-active-p))
                         gnus-group-marked t))
        (groups (gnus-group-process-prefix n)))
     (mapcar
@@ -1328,7 +1331,7 @@ If PERMANENT, make it stay hidden in subsequent sessions as well."
   (when (gnus-current-topic)
     (gnus-topic-goto-topic (gnus-current-topic))
     (if permanent
-       (setcar (cddr 
+       (setcar (cddr
                 (cadr
                  (gnus-topic-find-topology (gnus-current-topic))))
                'hidden))
@@ -1341,8 +1344,8 @@ If PERMANENT, make it stay shown in subsequent sessions as well."
   (when (gnus-group-topic-p)
     (if (not permanent)
        (gnus-topic-remove-topic t nil)
-      (let ((topic 
-            (gnus-topic-find-topology 
+      (let ((topic
+            (gnus-topic-find-topology
              (completing-read "Show topic: " gnus-topic-alist nil t))))
        (setcar (cddr (cadr topic)) nil)
        (setcar (cdr (cadr topic)) 'visible)
@@ -1357,7 +1360,7 @@ If RECURSIVE is t, mark its subtopics too."
   (if (not topic)
       (call-interactively 'gnus-group-mark-group)
     (save-excursion
-      (let ((groups (gnus-topic-find-groups topic gnus-level-killed t nil 
+      (let ((groups (gnus-topic-find-groups topic gnus-level-killed t nil
                                            recursive)))
        (while groups
          (funcall (if unmark 'gnus-group-remove-mark 'gnus-group-set-mark)
@@ -1603,7 +1606,7 @@ If REVERSE, sort in reverse order."
             (mapcar `(lambda (top)
                        (gnus-topic-sort-topics-1 top ,reverse))
                     (sort (cdr top)
-                          '(lambda (t1 t2) 
+                          '(lambda (t1 t2)
                              (string-lessp (caar t1) (caar t2)))))))
        (setcdr top (if reverse (reverse subtop) subtop))))
   top)
@@ -1611,8 +1614,8 @@ If REVERSE, sort in reverse order."
 (defun gnus-topic-sort-topics (&optional topic reverse)
   "Sort topics in TOPIC alphabeticaly by topic name.
 If REVERSE, reverse the sorting order."
-  (interactive 
-   (list (completing-read "Sort topics in : " gnus-topic-alist nil t 
+  (interactive
+   (list (completing-read "Sort topics in : " gnus-topic-alist nil t
                          (gnus-current-topic))
         current-prefix-arg))
   (let ((topic-topology (or (and topic (cdr (gnus-topic-find-topology topic)))
@@ -1624,8 +1627,8 @@ If REVERSE, reverse the sorting order."
 
 (defun gnus-topic-move (current to)
   "Move the CURRENT topic to TO."
-  (interactive 
-   (list 
+  (interactive
+   (list
     (gnus-group-topic-name)
     (completing-read "Move to topic: " gnus-topic-alist nil t)))
   (unless (and current to)
@@ -1658,7 +1661,7 @@ If REVERSE, reverse the sorting order."
          ;; Add the group to the topic.
          (nconc (assoc topic gnus-topic-alist) (list newsgroup))
          (throw 'end t))))))
-         
+
 (provide 'gnus-topic)
 
 ;;; gnus-topic.el ends here
index cc1034e..7a43ad5 100644 (file)
@@ -45,9 +45,10 @@ automatically."
   :group 'gnus-xmas)
 
 (unless gnus-xmas-glyph-directory
-  (unless (setq gnus-xmas-glyph-directory 
+  (unless (setq gnus-xmas-glyph-directory
                (message-xmas-find-glyph-directory "gnus"))
-    (gnus-error 1 "Can't find glyph directory. Possibly the `etc' directory is not installed.")))
+    (error "Can't find glyph directory. \
+Possibly the `etc' directory has not been installed.")))
 
 ;;(format "%02x%02x%02x" 114 66 20) "724214"
 
@@ -94,10 +95,6 @@ asynchronously.       The compressed face will be piped to this command."
 
 ;; Don't warn about these undefined variables.
 
-(defvar gnus-group-mode-hook)
-(defvar gnus-summary-mode-hook)
-(defvar gnus-article-mode-hook)
-
 ;;defined in gnus.el
 (defvar gnus-active-hashtb)
 (defvar gnus-article-buffer)
@@ -202,7 +199,7 @@ displayed, no centering will be performed."
        ;; whichever is the least.
        ;; NOFORCE parameter suggested by Daniel Pittman <daniel@danann.net>.
        (set-window-start
-        window (min bottom (save-excursion (forward-line (- top)) (point))) 
+        window (min bottom (save-excursion (forward-line (- top)) (point)))
         t))
       ;; Do horizontal recentering while we're at it.
       (when (and (get-buffer-window (current-buffer) t)
@@ -436,9 +433,6 @@ call it with the value of the `gnus-data' text property."
           (< emacs-minor-version 14))
       (defalias 'gnus-set-text-properties 'gnus-xmas-set-text-properties))
 
-  (when (fboundp 'turn-off-scroll-in-place)
-    (add-hook 'gnus-article-mode-hook 'turn-off-scroll-in-place))
-
   (unless (boundp 'standard-display-table)
     (setq standard-display-table nil))
 
@@ -483,30 +477,17 @@ call it with the value of the `gnus-data' text property."
   (defalias 'gnus-annotation-in-region-p 'gnus-xmas-annotation-in-region-p)
   (defalias 'gnus-mime-button-menu 'gnus-xmas-mime-button-menu)
 
-  (add-hook 'gnus-group-mode-hook 'gnus-xmas-group-menu-add)
-  (add-hook 'gnus-summary-mode-hook 'gnus-xmas-summary-menu-add)
-  (add-hook 'gnus-article-mode-hook 'gnus-xmas-article-menu-add)
+  ;; These ones are not defcutom'ed, sometimes not even defvar'ed. They
+  ;; probably should. If that is done, the code below should then be moved
+  ;; where each variable is defined, in order not to mess with user settings.
+  ;; -- didier
   (add-hook 'gnus-score-mode-hook 'gnus-xmas-score-menu-add)
-
-  (add-hook 'gnus-pick-mode-hook 'gnus-xmas-pick-menu-add)
-  (add-hook 'gnus-topic-mode-hook 'gnus-xmas-topic-menu-add)
-  (add-hook 'gnus-tree-mode-hook 'gnus-xmas-tree-menu-add)
   (add-hook 'gnus-binary-mode-hook 'gnus-xmas-binary-menu-add)
   (add-hook 'gnus-grouplens-mode-hook 'gnus-xmas-grouplens-menu-add)
   (add-hook 'gnus-server-mode-hook 'gnus-xmas-server-menu-add)
   (add-hook 'gnus-browse-mode-hook 'gnus-xmas-browse-menu-add)
-
-  (add-hook 'gnus-group-mode-hook 'gnus-xmas-setup-group-toolbar)
-  (add-hook 'gnus-summary-mode-hook 'gnus-xmas-setup-summary-toolbar)
-
-  (add-hook 'gnus-agent-summary-mode-hook 'gnus-xmas-agent-summary-menu-add)
-  (add-hook 'gnus-agent-group-mode-hook 'gnus-xmas-agent-group-menu-add)
-  (add-hook 'gnus-agent-server-mode-hook 'gnus-xmas-agent-server-menu-add)
-
   (add-hook 'gnus-draft-mode-hook 'gnus-xmas-draft-menu-add)
-  (add-hook 'gnus-summary-mode-hook
-           'gnus-xmas-switch-horizontal-scrollbar-off)
-  (add-hook 'gnus-tree-mode-hook 'gnus-xmas-switch-horizontal-scrollbar-off))
+  (add-hook 'gnus-mailing-list-mode-hook 'gnus-xmas-mailing-list-menu-add))
 
 
 ;;; XEmacs logo and toolbar.
@@ -875,8 +856,6 @@ XEmacs compatibility workaround."
   (gnus-xmas-menu-add mailing-list
                      gnus-mailing-list-menu))
 
-(add-hook 'gnus-mailing-list-mode-hook 'gnus-xmas-mailing-list-menu-add)
-
 (provide 'gnus-xmas)
 
 ;;; gnus-xmas.el ends here