From: Katsumi Yamaoka Date: Fri, 29 Oct 2010 07:13:33 +0000 (+0000) Subject: gnus-art.el (gnus-article-goto-part): Work for article narrowed by ^L. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~45^2~370^2~12 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9efcd22463b5414f1fe20314e371b4ad52dfcbe1;p=emacs.git gnus-art.el (gnus-article-goto-part): Work for article narrowed by ^L. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index df12e96cde6..c368d84cccf 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2010-10-29 Katsumi Yamaoka + + * gnus-art.el (gnus-article-goto-part): Work for article narrowed by ^L. + 2010-10-28 Lars Magne Ingebrigtsen * gnus-sum.el (gnus-summary-rescan-group): Try to restore the window diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index b4b16797ad7..235aa87bd6a 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -5561,12 +5561,13 @@ all parts." (defun gnus-article-goto-part (n) "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) - (if (setq handle (get-text-property start 'gnus-data)) - 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)) @@ -5586,10 +5587,12 @@ all parts." (setq part (cdr (assq (mm-preferred-alternative (nreverse (mapcar 'car handles))) - handles)))) - (if part - (goto-char (1+ part)) - start))))) + handles))))) + (when gnus-break-pages + (gnus-narrow-to-page)) + (if part + (goto-char (1+ part)) + start)))) (defun gnus-insert-mime-button (handle gnus-tmp-id &optional displayed) (let ((gnus-tmp-name