From: yamaoka Date: Mon, 8 Feb 1999 12:09:24 +0000 (+0000) Subject: * gnus.el (gnus-revision-number): Increment to 05. X-Git-Tag: t-gnus-6_10_057-05~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=de290e800d335202524118a52747d38c10f29f4b;p=elisp%2Fgnus.git- * gnus.el (gnus-revision-number): Increment to 05. * 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. --- diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index bce7a0c..699f177 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -4065,15 +4065,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 @@ -9139,6 +9144,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 8bf92cb..4fe9048 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -267,7 +267,7 @@ is restarted, and sometimes reloaded." (defconst gnus-version-number "6.10.057" "Version number for this version of gnus.") -(defconst gnus-revision-number "04" +(defconst gnus-revision-number "05" "Revision number for this version of gnus.") (defconst gnus-original-version-number "0.75"