From 7616bbebaa4a9c9a22c6e6ae0c03fadd5b7639fa Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 27 Nov 2002 01:57:39 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/ChangeLog | 8 ++++++++ lisp/gnus-art.el | 2 +- lisp/gnus-sum.el | 17 ++++++++++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 96eb867..32dd31c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2002-11-26 Kevin Ryde + + * gnus-art.el (gnus-mime-copy-part): Look for filename + parameter under content-disposition, not content-type. + + * gnus-sum.el (gnus-summary-find-uncancelled): New function. + (gnus-summary-reselect-current-group): Use it. + 2002-11-26 ShengHuo ZHU * gnus-agent.el (gnus-agent-uncached-articles): if diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 830f75c..b7af866 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -4255,7 +4255,7 @@ General format specifiers can also be used. See Info node (file-name-nondirectory (or (mail-content-type-get (mm-handle-type handle) 'name) - (mail-content-type-get (mm-handle-type handle) + (mail-content-type-get (mm-handle-disposition handle) 'filename) "*decoded*")))) (buffer (and base (generate-new-buffer base)))) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index fd6065b..ab15c72 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -6175,13 +6175,28 @@ With arg, turn line truncation on iff arg is positive." (> (prefix-numeric-value arg) 0))) (redraw-display)) +(defun gnus-summary-find-uncancelled () + "Return the number of an uncancelled article. +The current article is considered, then following articles, then previous +articles. If all articles are cancelled then return a dummy 0." + (let (found) + (dolist (rev '(nil t)) + (unless found ; don't demand the reverse list if we don't need it + (let ((data (gnus-data-find-list + (gnus-summary-article-number) (gnus-data-list rev)))) + (while (and data (not found)) + (if (not (eq gnus-canceled-mark (gnus-data-mark (car data)))) + (setq found (gnus-data-number (car data)))) + (setq data (cdr data)))))) + (or found 0))) + (defun gnus-summary-reselect-current-group (&optional all rescan) "Exit and then reselect the current newsgroup. The prefix argument ALL means to select all articles." (interactive "P") (when (gnus-ephemeral-group-p gnus-newsgroup-name) (error "Ephemeral groups can't be reselected")) - (let ((current-subject (gnus-summary-article-number)) + (let ((current-subject (gnus-summary-find-uncancelled)) (group gnus-newsgroup-name)) (setq gnus-newsgroup-begin nil) (gnus-summary-exit) -- 1.7.10.4