X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fgnus-uu.el;h=64ada4e2fde6546ddda647d28d8d3a5f1fc8cecc;hb=4cacb5f23eb830e6950dba987063f413977708d7;hp=2850c97e3583e174b2064b66682443e3929a8d09;hpb=e6c5b208e3214cf002750247a43e72316c351859;p=elisp%2Fgnus.git- diff --git a/lisp/gnus-uu.el b/lisp/gnus-uu.el index 2850c97..64ada4e 100644 --- a/lisp/gnus-uu.el +++ b/lisp/gnus-uu.el @@ -1,6 +1,7 @@ ;;; gnus-uu.el --- extract (uu)encoded files in Gnus -;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 2000, -;; 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + +;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, +;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Created: 2 Oct 1993 @@ -537,19 +538,19 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (defun gnus-message-process-mark (unmarkp new-marked) (let ((old (- (length gnus-newsgroup-processable) (length new-marked)))) - (message "%d mark%s %s%s" - (length new-marked) - (if (= (length new-marked) 1) "" "s") - (if unmarkp "removed" "added") - (cond - ((and (zerop old) - (not unmarkp)) - "") - (unmarkp - (format ", %d remain marked" - (length gnus-newsgroup-processable))) - (t - (format ", %d already marked" old)))))) + (gnus-message 6 "%d mark%s %s%s" + (length new-marked) + (if (= (length new-marked) 1) "" "s") + (if unmarkp "removed" "added") + (cond + ((and (zerop old) + (not unmarkp)) + "") + (unmarkp + (format ", %d remain marked" + (length gnus-newsgroup-processable))) + (t + (format ", %d already marked" old)))))) (defun gnus-new-processable (unmarkp articles) (if unmarkp @@ -577,16 +578,18 @@ When called interactively, prompt for REGEXP." (interactive "sUnmark (regexp): ") (gnus-uu-mark-by-regexp regexp t)) -(defun gnus-uu-mark-series () +(defun gnus-uu-mark-series (&optional silent) "Mark the current series with the process mark." (interactive) (let* ((articles (gnus-uu-find-articles-matching)) - (l (length articles))) + (l (length articles))) (while articles (gnus-summary-set-process-mark (car articles)) (setq articles (cdr articles))) - (message "Marked %d articles" l)) - (gnus-summary-position-point)) + (unless silent + (gnus-message 6 "Marked %d articles" l)) + (gnus-summary-position-point) + l)) (defun gnus-uu-mark-region (beg end &optional unmark) "Set the process mark on all articles between point and mark." @@ -694,14 +697,16 @@ When called interactively, prompt for REGEXP." (setq gnus-newsgroup-processable nil) (save-excursion (let ((data gnus-newsgroup-data) + (count 0) number) (while data (when (and (not (memq (setq number (gnus-data-number (car data))) gnus-newsgroup-processable)) (vectorp (gnus-data-header (car data)))) (gnus-summary-goto-subject number) - (gnus-uu-mark-series)) - (setq data (cdr data))))) + (setq count (+ count (gnus-uu-mark-series t)))) + (setq data (cdr data))) + (gnus-message 6 "Marked %d articles" count))) (gnus-summary-position-point)) ;; All PostScript functions written by Erik Selberg . @@ -901,16 +906,16 @@ When called interactively, prompt for REGEXP." (if gnus-uu-digest-buffer (with-current-buffer gnus-uu-digest-buffer (erase-buffer) - (insert-buffer "*gnus-uu-pre*") + (insert-buffer-substring "*gnus-uu-pre*") (goto-char (point-max)) - (insert-buffer "*gnus-uu-body*")) + (insert-buffer-substring "*gnus-uu-body*")) (save-excursion (set-buffer "*gnus-uu-pre*") (insert (format "\n\n%s\n\n" (make-string 70 ?-))) (if gnus-uu-digest-buffer (with-current-buffer gnus-uu-digest-buffer (erase-buffer) - (insert-buffer "*gnus-uu-pre*")) + (insert-buffer-substring "*gnus-uu-pre*")) (gnus-write-buffer-as-coding-system nnheader-text-coding-system gnus-uu-saved-article-name))) (save-excursion @@ -923,7 +928,7 @@ When called interactively, prompt for REGEXP." (if gnus-uu-digest-buffer (with-current-buffer gnus-uu-digest-buffer (goto-char (point-max)) - (insert-buffer "*gnus-uu-body*")) + (insert-buffer-substring "*gnus-uu-body*")) (let ((file-name-coding-system nnmail-pathname-coding-system)) (write-region-as-coding-system nnheader-text-coding-system @@ -1278,7 +1283,7 @@ When called interactively, prompt for REGEXP." (not gnus-uu-be-dangerous) (or (eq gnus-uu-be-dangerous t) (gnus-y-or-n-p - (format "Delete unsuccessfully decoded file %s" + (format "Delete unsuccessfully decoded file %s? " result-file)))) (delete-file result-file))) (when (memq 'begin process-state) @@ -1338,7 +1343,7 @@ When called interactively, prompt for REGEXP." (gnus-message 2 "No begin part at the beginning") (sleep-for 2)) (setq state 'middle)))) - + ;; When there are no result-files, then something must be wrong. (if result-files (message "")