Synch to Gnus 200310241132.
authoryamaoka <yamaoka>
Fri, 24 Oct 2003 12:24:06 +0000 (12:24 +0000)
committeryamaoka <yamaoka>
Fri, 24 Oct 2003 12:24:06 +0000 (12:24 +0000)
* Makefile.in (install-package): Don't call `compose-package'.
(install-package-ja): Ditto.
(package): Ditto.
(package-ja): Ditto.
(compose-package): Abolish.

* lisp/Makefile.in (compose-package): Abolish.

* lisp/dgnushack.el (dgnushack-unexporting-files): Add gnus-load.el when using
 XEmacs.
(dgnushack-dont-compile-files): Add gnus-load.el.
(dgnushack-auto-load-file): Abolish.
(dgnushack-make-auto-load): Don't delete the file specified by
 `dgnushack-auto-load-file'.
(dgnushack-compose-package): Abolish.

ChangeLog
Makefile.in
lisp/ChangeLog
lisp/Makefile.in
lisp/dgnushack.el
lisp/nndoc.el
lisp/spam.el

index 5d624e3..267e6b2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2003-10-24  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * Makefile.in (install-package): Don't call `compose-package'.
+       (install-package-ja): Ditto.
+       (package): Ditto.
+       (package-ja): Ditto.
+       (compose-package): Abolish.
+
+       * lisp/Makefile.in (compose-package): Abolish.
+
+       * lisp/dgnushack.el (dgnushack-unexporting-files): Add
+       gnus-load.el when using XEmacs.
+       (dgnushack-dont-compile-files): Add gnus-load.el.
+       (dgnushack-auto-load-file): Abolish.
+       (dgnushack-make-auto-load): Don't delete the file specified by
+       `dgnushack-auto-load-file'.
+       (dgnushack-compose-package): Abolish.
+
 2003-08-26  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * lisp/gnus-art.el (gnus-treat-display-x-face): Use `set-default'
index 69c491b..c566844 100644 (file)
@@ -60,22 +60,20 @@ install-info-ja:
 ## Rule for XEmacs package.
 install-package: \
        xclever-package \
-       compose-package \
        remove-extra-files-in-package \
        install-package-lisp \
        install-package-info install-package-manifest
 
 install-package-ja: \
        xclever-package \
-       compose-package \
        remove-extra-files-in-package \
        install-package-lisp \
        install-package-info install-package-info-ja \
        install-package-manifest
 
-package: xlick-package xinfo compose-package
+package: xlick-package xinfo
 
-package-ja: xlick-package xinfo xinfo-ja compose-package
+package-ja: xlick-package xinfo xinfo-ja
 
 # Sub-rule for XEmacs package.
 install-package-lisp:
@@ -138,10 +136,6 @@ remove-extra-files-in-package:
        cd lisp && $(MAKE) EMACS="$(XEMACS)" PACKAGEDIR=$$package_dir \
                lispdir="$(PACKAGEDIR)/lisp/$(GNUS_PRODUCT_NAME)" \
                remove-extra-files-in-package
-
-compose-package:
-       cd lisp && $(MAKE) EMACS="$(XEMACS)" \
-       lispdir="$(PACKAGEDIR)/lisp/$(GNUS_PRODUCT_NAME)" compose-package
 ##
 
 xclever:
index 948a110..ce0e547 100644 (file)
@@ -1,3 +1,26 @@
+2003-10-24  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * spam.el (spam-ham-copy-or-move-routine): do not delete if copy
+       is t, also don't intepret the list of groups as a list of lists
+
+2003-10-24  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * nndoc.el (nndoc-guess-type): Reverse the sort order.  Suggested
+       by ARISAWA Akihiro <ari@mbf.ocn.ne.jp>.
+       (nndoc-dissect-buffer): Don't miss even-numbered articles.
+
+2003-10-24  Steve Youngs  <sryoungs@bigpond.net.au>
+
+       * dgnushack.el (dgnushack-gnus-load-file): Set to
+       "auto-autoloads.el" if building with XEmacs.
+       (dgnushack-cus-load-file): Set to "custom-load.el" if building
+       with XEmacs.
+       (dgnushack-make-cus-load): We don't delete the resulting file if
+       building with XEmacs so byte-compile it.
+       (dgnushack-make-load): When building with XEmacs do nothing except
+       byte-compile the autoload file and create a dummy gnus-load.el
+       file. 
+
 2003-10-23  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * message.el (message-make-fqdn): Bind case-fold-search.
index 00ae7ed..87169f0 100644 (file)
@@ -73,9 +73,6 @@ install-package-manifest:
        $(EMACS_COMP) -f dgnushack-install-package-manifest \
                $(PACKAGEDIR) $(GNUS_PRODUCT_NAME)
 
-compose-package: gnus-load.el
-       $(EMACS_COMP) -f dgnushack-compose-package
-
 remove-extra-files-in-package:
        $(EMACS_COMP) -f dgnushack-remove-extra-files-in-package \
                $(PACKAGEDIR) $(GNUS_PRODUCT_NAME)
index 09f3fbd..f8f6afc 100644 (file)
@@ -602,7 +602,9 @@ Try to re-configure with --with-addpath=FLIM_PATH and run make again.
          (when (and (fboundp 'md5) (subrp (symbol-function 'md5)))
            '("md5.el"))
          (unless (boundp 'MULE)
-           '("canlock-om.el")))
+           '("canlock-om.el"))
+         (when (featurep 'xemacs)
+           '("gnus-load.el")))
   "Files which will not be installed.")
 
 (defconst dgnushack-exporting-files
@@ -617,7 +619,8 @@ Try to re-configure with --with-addpath=FLIM_PATH and run make again.
   (princ (mapconcat 'identity dgnushack-exporting-files " ")))
 
 (defconst dgnushack-dont-compile-files
-  '("mm-bodies.el" "mm-decode.el" "mm-encode.el" "mm-extern.el"
+  '("gnus-load.el"
+    "mm-bodies.el" "mm-decode.el" "mm-encode.el" "mm-extern.el"
     "mm-partial.el" "mm-url.el" "mm-uu.el" "mm-view.el" "mml-sec.el"
     "mml-smime.el" "mml.el" "mml1991.el" "mml2015.el")
   "Files which should not be byte-compiled.")
@@ -682,9 +685,15 @@ Modify to suit your needs."))
   (require 'gnus)
   (byte-recompile-directory "." 0))
 
-(defvar dgnushack-gnus-load-file (expand-file-name "gnus-load.el" srcdir))
-(defvar dgnushack-cus-load-file (expand-file-name "cus-load.el" srcdir))
-(defvar dgnushack-auto-load-file (expand-file-name "auto-autoloads.el" srcdir))
+(defvar dgnushack-gnus-load-file
+  (if (featurep 'xemacs)
+      (expand-file-name "auto-autoloads.el" srcdir)
+    (expand-file-name "gnus-load.el" srcdir)))
+
+(defvar        dgnushack-cus-load-file
+  (if (featurep 'xemacs)
+      (expand-file-name "custom-load.el" srcdir)
+    (expand-file-name "cus-load.el" srcdir)))
 
 (defun dgnushack-make-cus-load ()
   (when (condition-case nil
@@ -693,7 +702,10 @@ Modify to suit your needs."))
     (let ((cusload-base-file dgnushack-cus-load-file))
       (if (fboundp 'custom-make-dependencies)
          (custom-make-dependencies)
-       (Custom-make-dependencies)))))
+       (Custom-make-dependencies))
+      (when (featurep 'xemacs)
+       (message "Compiling %s..." dgnushack-cus-load-file)
+       (byte-compile-file dgnushack-cus-load-file)))))
 
 (defun dgnushack-make-auto-load ()
   (require 'autoload)
@@ -715,11 +727,8 @@ Modify to suit your needs."))
        (make-backup-files nil)
        (autoload-package-name "gnus"))
     (if (featurep 'xemacs)
-       (progn
-         (if (file-exists-p generated-autoload-file)
-             (delete-file generated-autoload-file))
-         (if (file-exists-p dgnushack-auto-load-file)
-             (delete-file dgnushack-auto-load-file)))
+       (if (file-exists-p generated-autoload-file)
+           (delete-file generated-autoload-file))
       (with-temp-file generated-autoload-file
        (insert ?\014)))
     (if (featurep 'xemacs)
@@ -738,55 +747,44 @@ Modify to suit your needs."))
       (batch-update-autoloads))))
 
 (defun dgnushack-make-load ()
-  (message "Generating %s..." dgnushack-gnus-load-file)
-  (with-temp-file dgnushack-gnus-load-file
-    (if (file-exists-p dgnushack-cus-load-file)
-       (progn
-         (insert-file-contents dgnushack-cus-load-file)
-         (delete-file dgnushack-cus-load-file)
-         (goto-char (point-min))
-         (search-forward ";;; Code:")
-         (forward-line)
-         (delete-region (point-min) (point))
-         (unless (re-search-forward "\
-^[\t ]*(autoload[\t\n ]+\\('\\|(quote[\t\n ]+\\)custom-add-loads[\t\n ]"
-                                    nil t)
-           (insert "\n(autoload 'custom-add-loads \"cus-load\")\n"))
-         (goto-char (point-min))
-         (insert "\
+  (unless (featurep 'xemacs)
+    (message "Generating %s..." dgnushack-gnus-load-file)
+    (with-temp-file dgnushack-gnus-load-file
+      (insert-file-contents dgnushack-cus-load-file)
+      (delete-file dgnushack-cus-load-file)
+      (goto-char (point-min))
+      (search-forward ";;; Code:")
+      (forward-line)
+      (delete-region (point-min) (point))
+      (insert "\
 ;;; gnus-load.el --- automatically extracted custom dependencies and autoload
 ;;
 ;;; Code:
 ")
-         (goto-char (point-max))
-         (if (search-backward "custom-versions-load-alist" nil t)
-             (forward-line -1)
-           (forward-line -1)
-           (while (eq (char-after) ?\;)
-             (forward-line -1))
-           (forward-line))
-         (delete-region (point) (point-max))
-         (insert "\n"))
+      (goto-char (point-max))
+      (if (search-backward "custom-versions-load-alist" nil t)
+         (forward-line -1)
+       (forward-line -1)
+       (while (eq (char-after) ?\;)
+         (forward-line -1))
+       (forward-line))
+      (delete-region (point) (point-max))
+      (insert "\n")
+      ;; smiley-* are duplicated. Remove them all.
+      (let ((point (point)))
+       (insert-file-contents dgnushack-gnus-load-file)
+       (goto-char point)
+       (while (search-forward "smiley-" nil t)
+         (beginning-of-line)
+         (if (looking-at "(autoload ")
+             (delete-region (point) (progn (forward-sexp) (point)))
+           (forward-line))))
+      ;;
+      (goto-char (point-max))
+      (when (search-backward "\n(provide " nil t)
+       (forward-line -1)
+       (delete-region (point) (point-max)))
       (insert "\
-;;; gnus-load.el --- automatically extracted autoload
-;;
-;;; Code:
-"))
-    ;; smiley-* are duplicated. Remove them all.
-    (let ((point (point)))
-      (insert-file-contents dgnushack-gnus-load-file)
-      (goto-char point)
-      (while (search-forward "smiley-" nil t)
-       (beginning-of-line)
-       (if (looking-at "(autoload ")
-           (delete-region (point) (progn (forward-sexp) (point)))
-         (forward-line))))
-    ;;
-    (goto-char (point-max))
-    (when (search-backward "\n(provide " nil t)
-      (forward-line -1)
-      (delete-region (point) (point-max)))
-    (insert "\
 
 \(provide 'gnus-load)
 
@@ -797,72 +795,15 @@ Modify to suit your needs."))
 ;;; End:
 ;;; gnus-load.el ends here
 ")
-    ;; Workaround the bug in some version of XEmacs.
-    (when (featurep 'xemacs)
-      (condition-case nil
-         (require 'cus-load)
-       (error nil))
-      (goto-char (point-min))
-      (when (and (fboundp 'custom-add-loads)
-                (not (search-forward "\n(autoload 'custom-add-loads " nil t)))
-       (search-forward "\n;;; Code:" nil t)
-       (forward-line 1)
-       (insert "\n(autoload 'custom-add-loads \"cus-load\")\n"))))
+      ))
   (message "Compiling %s..." dgnushack-gnus-load-file)
-  (byte-compile-file dgnushack-gnus-load-file))
-
-\f
-(defun dgnushack-compose-package ()
-  "Re-split the file gnus-load.el into custom-load.el and
-auto-autoloads.el.  It is silly, should be improved!"
-  (message "
-Re-splitting gnus-load.el into custom-load.el and auto-autoloads.el...")
-  (let ((customload (expand-file-name "custom-load.el" srcdir))
-       (autoloads (expand-file-name "auto-autoloads.el" srcdir))
-       start)
-    (with-temp-buffer
-      (insert-file-contents dgnushack-gnus-load-file)
-      (delete-file dgnushack-gnus-load-file)
-      (when (file-exists-p (concat dgnushack-gnus-load-file "c"))
-       (delete-file (concat dgnushack-gnus-load-file "c")))
-      (while (prog1
-                (looking-at "[\t ;]")
-              (forward-line 1)))
-      (setq start (point))
+  (byte-compile-file dgnushack-gnus-load-file)
+  (when (featurep 'xemacs)
+    (message "Creating dummy gnus-load.el...")
+    (with-temp-file (expand-file-name "gnus-load.el")
       (insert "\
-;;; custom-load.el --- automatically extracted custom dependencies\n
-;;; Code:\n\n")
-      (goto-char (point-max))
-      (while (progn
-              (forward-line -1)
-              (not (looking-at "[\t ]*(custom-add-loads[\t\n ]"))))
-      (forward-list 1)
-      (forward-line 1)
-      (insert "\n;;; custom-load.el ends here\n")
-      (write-region start (point) customload)
-      (while (looking-at "[\t ]*$")
-       (forward-line 1))
-      (setq start (point))
-      (if (re-search-forward "^[\t\n ]*(if[\t\n ]+(featurep[\t\n ]" nil t)
-         (let ((from (goto-char (match-beginning 0))))
-           (delete-region from (progn
-                                 (forward-list 1)
-                                 (forward-line 1)
-                                 (point))))
-       (while (looking-at "[\t ;]")
-         (forward-line 1)))
-      (insert "(if (featurep 'gnus-autoloads) (error \"Already loaded\"))\n")
-      (goto-char (point-max))
-      (while (progn
-              (forward-line -1)
-              (not (looking-at "[\t ]*(provide[\t\n ]"))))
-      (insert "(provide 'gnus-autoloads)\n")
-      (write-region start (point) autoloads))
-    (byte-compile-file customload)
-    (byte-compile-file autoloads))
-  (message "\
-Re-splitting gnus-load.el into custom-load.el and auto-autoloads.el...done
-\n"))
+
+\(provide 'gnus-load)"))))
 
 \f
 (defconst dgnushack-info-file-regexp-en
index ec12071..2c008f3 100644 (file)
@@ -394,7 +394,7 @@ from the document.")
       (error "Document is not of any recognized type"))
     (if result
        (car entry)
-      (cadar (sort results 'car-less-than-car)))))
+      (cadar (last (sort results 'car-less-than-car))))))
 
 ;;;
 ;;; Built-in type predicates and functions
@@ -772,7 +772,7 @@ from the document.")
   "Go through the document and partition it into heads/bodies/articles."
   (let ((i 0)
        (first t)
-       head-begin head-end body-begin body-end)
+       art-begin head-begin head-end body-begin body-end)
     (setq nndoc-dissection-alist nil)
     (save-excursion
       (set-buffer nndoc-current-buffer)
@@ -788,8 +788,11 @@ from the document.")
        ;; Go through the file.
        (while (if (and first nndoc-first-article)
                   (nndoc-search nndoc-first-article)
-                (nndoc-article-begin))
-         (setq first nil)
+                (if art-begin
+                    (goto-char art-begin)
+                  (nndoc-article-begin)))
+         (setq first nil
+               art-begin nil)
          (cond (nndoc-head-begin-function
                 (funcall nndoc-head-begin-function))
                (nndoc-head-begin
@@ -809,7 +812,8 @@ from the document.")
                     (funcall nndoc-body-end-function))
                (and nndoc-body-end
                     (nndoc-search nndoc-body-end))
-               (nndoc-article-begin)
+               (and (nndoc-article-begin)
+                    (setq art-begin (point)))
                (progn
                  (goto-char (point-max))
                  (when nndoc-file-end
index fd284a6..f24b1c3 100644 (file)
@@ -571,7 +571,7 @@ spamoracle database."
 
   (gnus-summary-yank-process-mark))
  
-(defun spam-ham-copy-or-move-routine (copy &rest groups)
+(defun spam-ham-copy-or-move-routine (copy groups)
   (gnus-summary-kill-process-mark)
   (let ((articles gnus-newsgroup-articles)
        article mark todo)
@@ -589,11 +589,12 @@ spamoracle database."
          (gnus-summary-set-process-mark article))
        (gnus-summary-copy-article nil group)))
   
-    ;; now delete the articles
-    (dolist (article todo)
-      (gnus-summary-set-process-mark article))
-    (when todo
-      (gnus-summary-delete-article nil)))
+    ;; now delete the articles, unless copy is t
+    (unless copy
+      (dolist (article todo)
+       (gnus-summary-set-process-mark article))
+      (when todo
+       (gnus-summary-delete-article nil))))
   
   (gnus-summary-yank-process-mark))