* encrypt.el (encrypt-xor-process-buffer): Replace `string-to-int'
[gnus] / lisp / gnus-uu.el
index 761398a..ba02db8 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-uu.el --- extract (uu)encoded files in Gnus
 ;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
-;;        2001, 2002, 2003 Free Software Foundation, Inc.
+;;        2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Created: 2 Oct 1993
@@ -480,7 +480,16 @@ didn't work, and overwrite existing files.  Otherwise, ask each time."
     (if (and n (not (numberp n)))
        (setq message-forward-as-mime (not message-forward-as-mime)
              n nil))
-    (let ((gnus-article-reply (gnus-summary-work-articles n)))
+    (let ((gnus-article-reply (gnus-summary-work-articles n))
+         gnus-newsgroup-processable)
+      (when (and (not n)
+                (= (length gnus-article-reply) 1))
+       ;; The case where neither a number of articles nor a region is
+       ;; specified.
+       (gnus-summary-top-thread)
+       (setq gnus-article-reply (gnus-uu-get-list-of-articles nil)))
+      ;; Specify articles to be forwarded.
+      (setq gnus-newsgroup-processable (copy-sequence gnus-article-reply))
       (gnus-setup-message 'forward
        (setq gnus-uu-digest-from-subject nil)
        (setq gnus-uu-digest-buffer
@@ -859,7 +868,7 @@ When called interactively, prompt for REGEXP."
              (mm-enable-multibyte)
              (mime-to-mml))
            (goto-char (point-min))
-           (re-search-forward "\n\n")
+           (search-forward "\n\n")
            (unless (and message-forward-as-mime gnus-uu-digest-buffer)
              ;; Quote all 30-dash lines.
              (save-excursion
@@ -1150,7 +1159,7 @@ When called interactively, prompt for REGEXP."
 
        ;; Expand numbers, sort, and return the list of article
        ;; numbers.
-       (mapcar (lambda (sub) (cdr sub))
+       (mapcar 'cdr
                (sort (gnus-uu-expand-numbers
                       list-of-subjects
                       (not do-not-translate))
@@ -1185,7 +1194,7 @@ When called interactively, prompt for REGEXP."
          (ignore-errors
            (replace-match
             (format "%06d"
-                    (string-to-int (buffer-substring
+                    (string-to-number (buffer-substring
                                     (match-beginning 0) (match-end 0)))))))
        (setq string (buffer-substring 1 (point-max)))
        (setcar (car string-list) string)
@@ -1751,7 +1760,7 @@ Gnus might fail to display all of it.")
 
       (setq gnus-uu-work-dir
            (mm-make-temp-file (concat gnus-uu-tmp-dir "gnus") 'dir))
-      (set-file-modes gnus-uu-work-dir 448)
+      (gnus-set-file-modes gnus-uu-work-dir 448)
       (setq gnus-uu-work-dir (file-name-as-directory gnus-uu-work-dir))
       (push (cons gnus-newsgroup-name gnus-uu-work-dir)
            gnus-uu-tmp-alist))))
@@ -1895,7 +1904,7 @@ The user will be asked for a file name."
   (when (gnus-uu-post-encode-file "uuencode" path file-name)
     (goto-char (point-min))
     (forward-line 1)
-    (while (re-search-forward " " nil t)
+    (while (search-forward " " nil t)
       (replace-match "`"))
     t))
 
@@ -2106,4 +2115,5 @@ If no file has been included, the user will be asked for a file."
 
 (provide 'gnus-uu)
 
+;;; arch-tag: 05312384-0a83-4720-9a58-b3160b888853
 ;;; gnus-uu.el ends here