From: Katsumi Yamaoka Date: Fri, 29 Oct 2010 07:22:52 +0000 (+0000) Subject: gnus-art.el (gnus-article-goto-part): Fix last change. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~45^2~370^2~11 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=95de0327d08519791252386914c514db860d7588;p=emacs.git gnus-art.el (gnus-article-goto-part): Fix last change. --- diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 235aa87bd6a..6d777937584 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -5563,36 +5563,39 @@ all parts." "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