From 95825efb71cdc61c4627fb26b4e07b3f0a7f80fa Mon Sep 17 00:00:00 2001 From: yamaoka Date: Tue, 15 Apr 2003 22:39:45 +0000 Subject: [PATCH] Synch to Oort Gnus 200304152216. --- lisp/ChangeLog | 20 ++++++++++++ lisp/gnus-art.el | 87 ++++++++++++++++++++++++++--------------------------- lisp/gnus-fun.el | 4 +-- lisp/nnmaildir.el | 12 +++++--- lisp/spam.el | 37 ++++++++++++----------- texi/ChangeLog | 4 +++ texi/gnus-ja.texi | 4 ++- texi/gnus.texi | 5 ++- 8 files changed, 101 insertions(+), 72 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 50373f4..da31cf5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,23 @@ +2003-04-16 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-article-next-page-1): New function. + (gnus-article-next-page): Use it. + +2003-04-15 Teodor Zlatanov + + * spam.el (spam-split): added save-restriction to save-excursion + +2003-04-15 Reiner Steib + From Julien Avarre + + * gnus-fun.el: Fixed autoload cookie. + +2003-04-15 Paul Jarc + From Remi Letot + + * nnmaildir.el (nnmaildir-request-scan): Use gnus-remove-if + instead of remove-if. + 2003-04-14 Katsumi Yamaoka * gnus-msg.el (gnus-summary-news-other-window): Use delq and diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index 5215415..2f07a47 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -5281,57 +5281,54 @@ If given a numerical ARG, move forward ARG pages." If end of article, return non-nil. Otherwise return nil. Argument LINES specifies lines to be scrolled up." (interactive "p") - (let ((start (window-start)) - end-of-buffer end-of-page) - (save-excursion - (move-to-window-line -1) - (if (<= (point) start) + (move-to-window-line -1) + (if (save-excursion + (end-of-line) + (and (pos-visible-in-window-p) ;Not continuation line. + (>= (1+ (point)) (point-max)))) ;Allow for trailing newline. + ;; Nothing in this page. + (if (or (not gnus-page-broken) + (save-excursion + (save-restriction + (widen) (forward-line 1) (eobp)))) ;Real end-of-buffer? (progn - (forward-line 2) - (setq start (point))) - (forward-line 1) - (setq start nil)) - (unless (or (cond ((eq (1+ (buffer-size)) (point)) - (and (pos-visible-in-window-p) - (setq end-of-buffer t))) - ((eobp) - (setq end-of-page t))) - (not lines)) - (move-to-window-line lines) - (unless (search-backward "\n\n" nil t) - (setq start (point))))) - (cond (end-of-buffer - (not gnus-article-over-scroll)) - (end-of-page - (gnus-narrow-to-page 1) - nil) - (t - (if start - (set-window-start (selected-window) start) - (let (window-pixel-scroll-increment) - (scroll-up lines))) - nil)))) + (when gnus-article-over-scroll + (gnus-article-next-page-1 lines)) + t) ;Nothing more. + (gnus-narrow-to-page 1) ;Go to next page. + nil) + ;; More in this page. + (gnus-article-next-page-1 lines) + nil)) + +(defun gnus-article-next-page-1 (lines) + (let ((scroll-in-place nil)) + (condition-case () + (scroll-up lines) + (end-of-buffer + ;; Long lines may cause an end-of-buffer error. + (goto-char (point-max))))) + (move-to-window-line 0)) (defun gnus-article-prev-page (&optional lines) "Show previous page of current article. Argument LINES specifies lines to be scrolled down." (interactive "p") - (let (beginning-of-buffer beginning-of-page) - (save-excursion - (move-to-window-line 0) - (cond ((eq 1 (point)) - (setq beginning-of-buffer t)) - ((bobp) - (setq beginning-of-page t)))) - (cond (beginning-of-buffer) - (beginning-of-page - (gnus-narrow-to-page -1)) - (t - (condition-case nil - (let (window-pixel-scroll-increment) - (scroll-down lines)) - (beginning-of-buffer - (goto-char (point-min)))))))) + (move-to-window-line 0) + (if (and gnus-page-broken + (bobp) + (not (save-restriction (widen) (bobp)))) ;Real beginning-of-buffer? + (progn + (gnus-narrow-to-page -1) ;Go to previous page. + (goto-char (point-max)) + (recenter -1)) + (let ((scroll-in-place nil)) + (prog1 + (condition-case () + (scroll-down lines) + (beginning-of-buffer + (goto-char (point-min)))) + (move-to-window-line 0))))) (defun gnus-article-only-boring-p () "Decide whether there is only boring text remaining in the article. diff --git a/lisp/gnus-fun.el b/lisp/gnus-fun.el index 2352372..7ff19ec 100644 --- a/lisp/gnus-fun.el +++ b/lisp/gnus-fun.el @@ -118,7 +118,7 @@ Output to the current buffer, replace text, and don't mingle error." (length attempt) quant)) (setq done t))) (if done - (mm-with-unibyte-buffer + (mm-with-unibyte-buffer (insert attempt) (gnus-face-encode)) nil)))) @@ -147,7 +147,7 @@ The PNG is returned as a string." (base64-decode-region (point-min) (point-max))) (buffer-string))) -;;;#autoload +;;;###autoload (defun gnus-convert-png-to-face (file) "Convert FILE to a Face. FILE should be a PNG file that's 48x48 and smaller than or equal to diff --git a/lisp/nnmaildir.el b/lisp/nnmaildir.el index eeee5de..65bb5bd 100644 --- a/lisp/nnmaildir.el +++ b/lisp/nnmaildir.el @@ -801,11 +801,13 @@ by nnmaildir-request-article.") (setq dirs (funcall srv-ls srv-dir nil "\\`[^.]" 'nosort) dirs (if (zerop (length target-prefix)) dirs - (remove-if (lambda (dir) - (and (>= (length dir) (length target-prefix)) - (string= (substring dir 0 (length target-prefix)) - target-prefix))) - dirs)) + (gnus-remove-if + (lambda (dir) + (and (>= (length dir) (length target-prefix)) + (string= (substring dir 0 + (length target-prefix)) + target-prefix))) + dirs)) seen (nnmaildir--up2-1 (length dirs)) seen (make-vector seen 0)) (mapcar diff --git a/lisp/spam.el b/lisp/spam.el index a64606d..1d1126b 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -593,24 +593,25 @@ example like this: (: spam-split) See the Info node `(gnus)Fancy Mail Splitting' for more details." (interactive) (save-excursion - (dolist (check spam-list-of-statistical-checks) - (when (symbol-value check) - (widen) - (gnus-message 8 "spam-split: widening the buffer (%s requires it)" - (symbol-name check)) - (return))) -;; (progn (widen) (debug (buffer-string))) - (let ((list-of-checks spam-list-of-checks) - decision) - (while (and list-of-checks (not decision)) - (let ((pair (pop list-of-checks))) - (when (symbol-value (car pair)) - (gnus-message 5 "spam-split: calling the %s function" (symbol-name (cdr pair))) - (setq decision (funcall (cdr pair)))))) - (if (eq decision t) - nil - decision)))) - + (save-restriction + (dolist (check spam-list-of-statistical-checks) + (when (symbol-value check) + (widen) + (gnus-message 8 "spam-split: widening the buffer (%s requires it)" + (symbol-name check)) + (return))) + ;; (progn (widen) (debug (buffer-string))) + (let ((list-of-checks spam-list-of-checks) + decision) + (while (and list-of-checks (not decision)) + (let ((pair (pop list-of-checks))) + (when (symbol-value (car pair)) + (gnus-message 5 "spam-split: calling the %s function" (symbol-name (cdr pair))) + (setq decision (funcall (cdr pair)))))) + (if (eq decision t) + nil + decision))))) + (defun spam-setup-widening () (dolist (check spam-list-of-statistical-checks) (when (symbol-value check) diff --git a/texi/ChangeLog b/texi/ChangeLog index 6533b81..7c4c677 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,7 @@ +2003-04-16 Lars Magne Ingebrigtsen + + * gnus.texi (Group Line Specification): Add. + 2003-04-13 Simon Josefsson * gnus.texi (Security): Add text about PGP key snarf. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 80dc6ed..d57aea9 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -1948,7 +1948,9 @@ gnus がこの推定を使うのは、@sc{nntp} プロトコルは能率の良 ト (@pxref{Group Parameters}) またはグループ名。 @item D -ニュースグループの説明。 +ニュースグループの説明。これらが現れる前に、グループの説明を読む必要があ +ります。それには @code{gnus-read-active-file} を設定するか、グループバッ +ファで @kbd{M-d} コマンドを使って下さい。 @item o 司会者付きの場合 @samp{m}。 diff --git a/texi/gnus.texi b/texi/gnus.texi index a707b55..6c30487 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1823,7 +1823,10 @@ Group comment (@pxref{Group Parameters}) or group name if there is no comment element in the group parameters. @item D -Newsgroup description. +Newsgroup description. You need to read the group descriptions +before these will appear, and to do that, you either have to set +@code{gnus-read-active-file} or use the group buffer @kbd{M-d} +command. @item o @samp{m} if moderated. -- 1.7.10.4