* gnus-art.el (gnus-narrow-to-page): Clear as well as set the value for
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 21 Oct 2003 14:28:33 +0000 (14:28 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 21 Oct 2003 14:28:33 +0000 (14:28 +0000)
 gnus-page-broken.

* gnus-sum.el (gnus-summary-beginning-of-article): Use gnus-break-pages
 instead of gnus-page-broken.
(gnus-summary-end-of-article): Use gnus-break-pages instead of
 gnus-page-broken;
 narrow to the end of a page beforehand.
(gnus-summary-toggle-header): Use gnus-break-pages instead of
 gnus-page-broken;
 remove delimiter buttons unless gnus-break-pages is non-nil.

lisp/ChangeLog
lisp/gnus-art.el
lisp/gnus-sum.el

index 366fa07..34ccf4e 100644 (file)
@@ -1,3 +1,16 @@
+2003-10-21  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-art.el (gnus-narrow-to-page): Clear as well as set the
+       value for gnus-page-broken.
+
+       * gnus-sum.el (gnus-summary-beginning-of-article): Use
+       gnus-break-pages instead of gnus-page-broken.
+       (gnus-summary-end-of-article): Use gnus-break-pages instead of
+       gnus-page-broken; narrow to the end of a page beforehand.
+       (gnus-summary-toggle-header): Use gnus-break-pages instead of
+       gnus-page-broken; remove delimiter buttons unless gnus-break-pages
+       is non-nil.
+
 2003-10-21  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-picon.el (gnus-picon-transform-address): Protect against
index 0c88b88..49b6bab 100644 (file)
@@ -4933,13 +4933,16 @@ If given a numerical ARG, move forward ARG pages."
       (let ((buffer-read-only nil))
        (gnus-remove-text-with-property 'gnus-prev)
        (gnus-remove-text-with-property 'gnus-next)))
-    (when
+    (if
        (cond ((< arg 0)
               (re-search-backward page-delimiter nil 'move (1+ (abs arg))))
              ((> arg 0)
               (re-search-forward page-delimiter nil 'move arg)))
-      (setq gnus-page-broken t)
-      (goto-char (match-end 0)))
+       (goto-char (match-end 0))
+      (save-excursion
+       (goto-char (point-min))
+       (setq gnus-page-broken
+             (and (re-search-forward page-delimiter nil t) t))))
     (when gnus-page-broken
       (narrow-to-region
        (point)
index 850dc13..015768f 100644 (file)
@@ -8506,7 +8506,7 @@ article.  If BACKWARD (the prefix) is non-nil, search backward instead."
   (gnus-eval-in-buffer-window gnus-article-buffer
     (widen)
     (goto-char (point-min))
-    (when gnus-page-broken
+    (when gnus-break-pages
       (gnus-narrow-to-page))))
 
 (defun gnus-summary-end-of-article ()
@@ -8518,7 +8518,9 @@ article.  If BACKWARD (the prefix) is non-nil, search backward instead."
     (widen)
     (goto-char (point-max))
     (recenter -3)
-    (when gnus-page-broken
+    (when gnus-break-pages
+      (when (re-search-backward page-delimiter nil t)
+       (narrow-to-region (match-end 0) (point-max)))
       (gnus-narrow-to-page))))
 
 (defun gnus-summary-print-truncate-and-quote (string &optional len)
@@ -8708,10 +8710,12 @@ If ARG is a negative number, hide the unwanted header lines."
        (widen)
        (if window
            (set-window-start window (goto-char (point-min))))
-       (setq gnus-page-broken
-             (when gnus-break-pages
-               (gnus-narrow-to-page)
-               t))
+       (if gnus-break-pages
+           (gnus-narrow-to-page)
+         (when (gnus-visual-p 'page-marker)
+           (let ((buffer-read-only nil))
+             (gnus-remove-text-with-property 'gnus-prev)
+             (gnus-remove-text-with-property 'gnus-next))))
        (gnus-set-mode-line 'article)))))
 
 (defun gnus-summary-show-all-headers ()