summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2008-03-10 02:39:57 +0000
committerMiles Bader <miles@gnu.org>2008-03-10 02:39:57 +0000
commit3796e315640fee3feb81091d27196a38f437c8d9 (patch)
treec44a37c34426c27565919d59a0e745eb3e286382 /lisp/gnus
parent46aeed76006a096b17289b80b07770703b580bbc (diff)
downloademacs-3796e315640fee3feb81091d27196a38f437c8d9.tar.gz
Merge from gnus--rel--5.10
Revision: emacs@sv.gnu.org/emacs--rel--22--patch-246
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/ChangeLog9
-rw-r--r--lisp/gnus/gnus-art.el71
-rw-r--r--lisp/gnus/gnus-sum.el2
-rw-r--r--lisp/gnus/mm-view.el2
4 files changed, 51 insertions, 33 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 455d0efd788..960e1a835f7 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -4,6 +4,15 @@
default to nil.
(mail-source-delete-old-incoming): Make confirmation prompt more clear.
+2008-03-07 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-art.el (gnus-narrow-to-page): Position point properly.
+ (gnus-article-goto-prev-page): Work for articles having ^L's.
+
+ * gnus-sum.el (gnus-summary-end-of-article): Remove needless narrowing.
+
+ * mm-view.el (mm-w3m-standalone-supports-m17n-p): Fix typo.
+
2008-03-05 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-sum.el (gnus-print-buffer): Honor ps-print-color-p.
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 5ce0a773b28..d509fd414f7 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -5398,41 +5398,52 @@ the coding cookie."
If given a numerical ARG, move forward ARG pages."
(interactive "P")
(setq arg (if arg (prefix-numeric-value arg) 0))
- (save-excursion
- (set-buffer gnus-article-buffer)
- (goto-char (point-min))
+ (with-current-buffer gnus-article-buffer
(widen)
;; Remove any old next/prev buttons.
(when (gnus-visual-p 'page-marker)
(let ((inhibit-read-only t))
(gnus-remove-text-with-property 'gnus-prev)
(gnus-remove-text-with-property 'gnus-next)))
- (if
- (cond ((< arg 0)
- (re-search-backward page-delimiter nil 'move (1+ (abs arg))))
- ((> arg 0)
- (re-search-forward page-delimiter nil 'move arg)))
- (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)
- (if (re-search-forward page-delimiter nil 'move)
- (match-beginning 0)
- (point)))
- (when (and (gnus-visual-p 'page-marker)
- (> (point-min) (save-restriction (widen) (point-min))))
- (save-excursion
- (goto-char (point-min))
- (gnus-insert-prev-page-button)))
- (when (and (gnus-visual-p 'page-marker)
- (< (point-max) (save-restriction (widen) (point-max))))
- (save-excursion
- (goto-char (point-max))
- (gnus-insert-next-page-button))))))
+ (let (st nd pt)
+ (when (save-excursion
+ (cond ((< arg 0)
+ (if (re-search-backward page-delimiter nil 'move (abs arg))
+ (prog1
+ (setq nd (match-beginning 0)
+ pt nd)
+ (when (re-search-backward page-delimiter nil t)
+ (setq st (match-end 0))))
+ (when (re-search-forward page-delimiter nil t)
+ (setq nd (match-beginning 0)
+ pt (point-min)))))
+ ((> arg 0)
+ (if (re-search-forward page-delimiter nil 'move arg)
+ (prog1
+ (setq st (match-end 0)
+ pt st)
+ (when (re-search-forward page-delimiter nil t)
+ (setq nd (match-beginning 0))))
+ (when (re-search-backward page-delimiter nil t)
+ (setq st (match-end 0)
+ pt (point-max)))))
+ (t
+ (when (re-search-backward page-delimiter nil t)
+ (goto-char (setq st (match-end 0))))
+ (when (re-search-forward page-delimiter nil t)
+ (setq nd (match-beginning 0)))
+ (or st nd))))
+ (setq gnus-page-broken t)
+ (when pt (goto-char pt))
+ (narrow-to-region (or st (point-min)) (or nd (point-max)))
+ (when (gnus-visual-p 'page-marker)
+ (save-excursion
+ (when nd
+ (goto-char nd)
+ (gnus-insert-next-page-button))
+ (when st
+ (goto-char st)
+ (gnus-insert-prev-page-button))))))))
;; Article mode commands
@@ -5447,7 +5458,7 @@ If given a numerical ARG, move forward ARG pages."
(defun gnus-article-goto-prev-page ()
"Show the previous page of the article."
(interactive)
- (if (bobp)
+ (if (save-restriction (widen) (bobp)) ;; Real beginning-of-buffer?
(gnus-article-read-summary-keys nil (gnus-character-to-event ?p))
(gnus-article-prev-page nil)))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 269da70461a..626ce26d2fd 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -8842,8 +8842,6 @@ article. If BACKWARD (the prefix) is non-nil, search backward instead."
(goto-char (point-max))
(recenter -3)
(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)
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index e89852cf9bd..df4ffb84eab 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -285,7 +285,7 @@
(let ((coding-system-for-write 'iso-2022-jp)
(coding-system-for-read 'iso-2022-jp)
(str (mm-decode-coding-string "\
-\e$B#D#o#e#s!!#w#3#m!!#s#u#p#p#o#r#t#s!!#m#1#7#n!)\e(B" 'iso-2022-jp)))
+\e$B#D#o#e#s!!#w#3#m!!#s#u#p#p#o#r#t!!#m#1#7#n!)\e(B" 'iso-2022-jp)))
(mm-with-multibyte-buffer
(insert str)
(call-process-region