changeset 111225:558e2acd682c

gnus-art.el (gnus-article-goto-part): Work for article narrowed by ^L.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Fri, 29 Oct 2010 07:13:33 +0000
parents b9e560ce3ab6
children 5fcc7b3a72d5
files lisp/gnus/ChangeLog lisp/gnus/gnus-art.el
diffstat 2 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Fri Oct 29 00:04:09 2010 -0700
+++ b/lisp/gnus/ChangeLog	Fri Oct 29 07:13:33 2010 +0000
@@ -1,3 +1,7 @@
+2010-10-29  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus-art.el (gnus-article-goto-part): Work for article narrowed by ^L.
+
 2010-10-28  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 	* gnus-sum.el (gnus-summary-rescan-group): Try to restore the window
--- a/lisp/gnus/gnus-art.el	Fri Oct 29 00:04:09 2010 -0700
+++ b/lisp/gnus/gnus-art.el	Fri Oct 29 07:13:33 2010 +0000
@@ -5561,12 +5561,13 @@
 
 (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 @@
 	  (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