Mercurial > emacs
changeset 111226:5fcc7b3a72d5
gnus-art.el (gnus-article-goto-part): Fix last change.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Fri, 29 Oct 2010 07:19:21 +0000 |
parents | 558e2acd682c |
children | 17c2d0830a46 |
files | lisp/gnus/gnus-art.el |
diffstat | 1 files changed, 33 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/gnus-art.el Fri Oct 29 07:13:33 2010 +0000 +++ b/lisp/gnus/gnus-art.el Fri Oct 29 07:19:21 2010 +0000 @@ -5563,36 +5563,39 @@ "Go to MIME part N." (when gnus-break-pages (widen)) - (let ((start (text-property-any (point-min) (point-max) 'gnus-part n)) - part handle end next handles) - (when start - (goto-char start) - (unless (setq handle (get-text-property start 'gnus-data)) - ;; Go to the displayed subpart, assuming this is multipart/alternative. - (setq part start - end (point-at-eol)) - (while (and (not handle) - part - (< part end) - (setq next (text-property-not-all part end - 'gnus-data nil))) - (setq part next - handle (get-text-property part 'gnus-data)) - (push (cons handle part) handles) - (unless (mm-handle-displayed-p handle) - (setq handle nil - part (text-property-any part end 'gnus-data nil)))) - (unless handle - ;; No subpart is displayed, so we find preferred one. - (setq part - (cdr (assq (mm-preferred-alternative - (nreverse (mapcar 'car handles))) - handles))))) - (when gnus-break-pages - (gnus-narrow-to-page)) - (if part - (goto-char (1+ part)) - start)))) + (prog1 + (let ((start (text-property-any (point-min) (point-max) 'gnus-part n)) + part handle end next handles) + (when start + (goto-char start) + (if (setq handle (get-text-property start 'gnus-data)) + start + ;; Go to the displayed subpart, assuming this is + ;; multipart/alternative. + (setq part start + end (point-at-eol)) + (while (and (not handle) + part + (< part end) + (setq next (text-property-not-all part end + 'gnus-data nil))) + (setq part next + handle (get-text-property part 'gnus-data)) + (push (cons handle part) handles) + (unless (mm-handle-displayed-p handle) + (setq handle nil + part (text-property-any part end 'gnus-data nil)))) + (unless handle + ;; No subpart is displayed, so we find preferred one. + (setq part + (cdr (assq (mm-preferred-alternative + (nreverse (mapcar 'car handles))) + handles))))) + (if part + (goto-char (1+ part)) + start))) + (when gnus-break-pages + (gnus-narrow-to-page)))) (defun gnus-insert-mime-button (handle gnus-tmp-id &optional displayed) (let ((gnus-tmp-name