From 42f2d4d645b199c4e2b49e0626a6ace26b67aa7e Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 8 Feb 1999 12:07:56 +0000 Subject: [PATCH] * gnus.el (gnus-version-number): Update to 6.10.5. * gnus-sum.el (gnus-articles-to-read): If the number of unread articles is more than `gnus-large-newsgroup', use it in default instead of the maximum number. (gnus-mime-extract-multipart): New function; add it to the acting-condition for extracting mulitpart messages. (gnus-mime-extract-message/rfc822): New function; add it to the acting-condition for extracting message/rfc822 or message/news. --- lisp/gnus-sum.el | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++---- lisp/gnus.el | 2 +- 2 files changed, 105 insertions(+), 9 deletions(-) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 8a1486d..e4bc1d6 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -3965,15 +3965,20 @@ If SELECT-ARTICLES, only select those articles from GROUP." (condition-case () (cond ((and (or (<= scored marked) (= scored number)) - (numberp gnus-large-newsgroup) + (natnump gnus-large-newsgroup) (> number gnus-large-newsgroup)) - (let ((input - (read-string - (format - "How many articles from %s (default %d): " - (gnus-limit-string gnus-newsgroup-name 35) - number)))) - (if (string-match "^[ \t]*$" input) number input))) + (let* ((minibuffer-setup-hook (append + minibuffer-setup-hook + '(beginning-of-line))) + (input (read-string + (format + "How many articles from %s (max %d): " + (gnus-limit-string gnus-newsgroup-name 35) + number) + (number-to-string gnus-large-newsgroup)))) + (if (string-match "^[ \t]*$" input) + gnus-large-newsgroup + input))) ((and (> scored marked) (< scored number) (> (- scored number) 20)) (let ((input @@ -8984,6 +8989,97 @@ save those articles instead." )) +;;; @ for message/rfc822 +;;; + +(defun gnus-mime-extract-message/rfc822 (entity situation) + (with-current-buffer (mime-entity-buffer entity) + (save-restriction + (narrow-to-region (mime-entity-body-start entity) + (mime-entity-body-end entity)) + (let* ((group (or (cdr (assq 'group situation)) + (completing-read "Group: " + gnus-active-hashtb + nil + (gnus-read-active-file-p) + gnus-newsgroup-name))) + cur + (article (gnus-request-accept-article group)) + (num (or (cdr (assq 'number situation)) + 0))) + (when (and (consp article) + (numberp (setq article (cdr article)))) + (incf num) + (with-current-buffer gnus-summary-buffer + (setq cur gnus-current-article) + (forward-line num) + (let (gnus-show-threads) + (gnus-summary-goto-subject article t) + ) + (gnus-summary-clear-mark-forward 1) + ) + (if (boundp 'mime-acting-situation-to-override) + (progn + (set-alist 'mime-acting-situation-to-override + 'group + group) + (set-alist 'mime-acting-situation-to-override + 'after-method + `(progn + (save-current-buffer + (set-buffer gnus-group-buffer) + (gnus-activate-group ,group) + ) + (gnus-summary-goto-article ,cur + gnus-show-all-headers) + )) + (set-alist 'mime-acting-situation-to-override + 'number num) + ) + (save-current-buffer + (set-buffer gnus-group-buffer) + (gnus-activate-group group) + (set-buffer gnus-summary-buffer) + (gnus-summary-goto-article cur gnus-show-all-headers) + ) + )))))) + +(mime-add-condition + 'action '((type . message)(subtype . rfc822) + (major-mode . gnus-original-article-mode) + (method . gnus-mime-extract-message/rfc822) + (mode . "extract") + )) + +(mime-add-condition + 'action '((type . message)(subtype . news) + (major-mode . gnus-original-article-mode) + (method . gnus-mime-extract-message/rfc822) + (mode . "extract") + )) + +(defun gnus-mime-extract-multipart (entity situation) + (let ((children (mime-entity-children entity)) + mime-acting-situation-to-override + f) + (while children + (mime-play-entity (car children) + (cons (assq 'mode situation) + mime-acting-situation-to-override)) + (setq children (cdr children))) + (if (setq f (cdr (assq 'after-method + mime-acting-situation-to-override))) + (eval f) + ))) + +(mime-add-condition + 'action '((type . multipart) + (method . gnus-mime-extract-multipart) + (mode . "extract") + ) + 'with-default) + + ;;; @ end ;;; diff --git a/lisp/gnus.el b/lisp/gnus.el index 5eb111e..0502984 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -253,7 +253,7 @@ is restarted, and sometimes reloaded." (defconst gnus-product-name "Semi-gnus" "Product name of this version of gnus.") -(defconst gnus-version-number "6.10.4" +(defconst gnus-version-number "6.10.5" "Version number for this version of gnus.") (defconst gnus-version -- 1.7.10.4