From: yamaoka Date: Sun, 26 Sep 2004 22:01:04 +0000 (+0000) Subject: Synch to No Gnus 200409261905. X-Git-Tag: t-gnus-6_17_4-quimby-~744 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=078f9697cf29ddf6c5c0f4e5952d13fec3b18852;p=elisp%2Fgnus.git- Synch to No Gnus 200409261905. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f0d947e..5c6e014 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,21 @@ +2004-09-26 Jesper Harder + + * gnus-dup.el (gnus-dup-open): Use mapc. + (gnus-dup-enter-articles, gnus-dup-suppress-articles): Use dolist. + + (gnus-dup-enter-articles): Remove excess ID's from gnus-dup-hashtb. + Reported by Stefan Wiens . + + * gnus.el (gnus-shutdown): Use dolist. + + * gnus-undo.el (gnus-undo): Use mapc. + + * nnrss.el (nnrss-generate-active): do. + + * message.el (message-cite-original-without-signature) + (message-cite-original): Use mapc. + (message-do-actions, message-make-forward-subject): Use dolist. + 2004-09-25 Kevin Greiner * gnus-agent.el (gnus-agent-check-overview-buffer): Fixed range of diff --git a/lisp/gnus-dup.el b/lisp/gnus-dup.el index a385d0a..b332e73 100644 --- a/lisp/gnus-dup.el +++ b/lisp/gnus-dup.el @@ -1,5 +1,5 @@ ;;; gnus-dup.el --- suppression of duplicate articles in Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000 +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 ;; Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen @@ -84,10 +84,8 @@ seen in the same session." (setq gnus-dup-list nil)) (setq gnus-dup-hashtb (gnus-make-hashtable gnus-duplicate-list-length)) ;; Enter all Message-IDs into the hash table. - (let ((list gnus-dup-list) - (obarray gnus-dup-hashtb)) - (while list - (intern (pop list))))) + (let ((obarray gnus-dup-hashtb)) + (mapc 'intern gnus-dup-list))) (defun gnus-dup-read () "Read the duplicate suppression list." @@ -112,11 +110,10 @@ seen in the same session." (unless gnus-dup-list (gnus-dup-open)) (setq gnus-dup-list-dirty t) ; mark list for saving - (let ((data gnus-newsgroup-data) - datum msgid) + (let (msgid) ;; Enter the Message-IDs of all read articles into the list ;; and hash table. - (while (setq datum (pop data)) + (dolist (datum gnus-newsgroup-data) (when (and (not (gnus-data-pseudo-p datum)) (> (gnus-data-number datum) 0) (not (memq (gnus-data-number datum) gnus-newsgroup-unreads)) @@ -129,6 +126,7 @@ seen in the same session." ;; Chop off excess Message-IDs from the list. (let ((end (nthcdr gnus-duplicate-list-length gnus-dup-list))) (when end + (mapc (lambda (id) (unintern id gnus-dup-hashtb)) (cdr end)) (setcdr end nil)))) (defun gnus-dup-suppress-articles () @@ -136,11 +134,10 @@ seen in the same session." (unless gnus-dup-list (gnus-dup-open)) (gnus-message 6 "Suppressing duplicates...") - (let ((headers gnus-newsgroup-headers) - (auto (and gnus-newsgroup-auto-expire + (let ((auto (and gnus-newsgroup-auto-expire (memq gnus-duplicate-mark gnus-auto-expirable-marks))) - number header) - (while (setq header (pop headers)) + number) + (dolist (header gnus-newsgroup-headers) (when (and (intern-soft (mail-header-id header) gnus-dup-hashtb) (gnus-summary-article-unread-p (mail-header-number header))) (setq gnus-newsgroup-unreads diff --git a/lisp/gnus-undo.el b/lisp/gnus-undo.el index 6557f5a..337d6cb 100644 --- a/lisp/gnus-undo.el +++ b/lisp/gnus-undo.el @@ -186,8 +186,7 @@ A numeric argument serves as a repeat count." (error "Nothing further to undo")) (setq gnus-undo-actions (delq action gnus-undo-actions)) (setq gnus-undo-boundary t) - (while action - (funcall (pop action))))) + (mapc 'funcall action))) (provide 'gnus-undo) diff --git a/lisp/gnus.el b/lisp/gnus.el index 45d7945..bcc8902 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -3117,11 +3117,9 @@ Return nil if not defined." (defun gnus-shutdown (symbol) "Shut down everything that waits for SYMBOL." - (let ((alist gnus-shutdown-alist) - entry) - (while (setq entry (pop alist)) - (when (memq symbol (cdr entry)) - (funcall (car entry)))))) + (dolist (entry gnus-shutdown-alist) + (when (memq symbol (cdr entry)) + (funcall (car entry))))) ;;; diff --git a/lisp/message.el b/lisp/message.el index 740bc5f..e6efd24 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -3598,8 +3598,7 @@ be added to the \"References\" field." ;; Insert a blank line if it is peeled off. (insert "\n"))) (goto-char start) - (while functions - (funcall (pop functions))) + (mapc 'funcall functions) (when message-citation-line-function (unless (bolp) (insert "\n")) @@ -3630,8 +3629,7 @@ be added to the \"References\" field." "unknown sender")) (setq x-no-archive (message-fetch-field "x-no-archive"))) (goto-char start) - (while functions - (funcall (pop functions))) + (mapc 'funcall functions) (when message-citation-line-function (unless (bolp) (insert "\n")) @@ -4079,16 +4077,15 @@ not have PROP." (defun message-do-actions (actions) "Perform all actions in ACTIONS." ;; Now perform actions on successful sending. - (while actions + (dolist (action actions) (ignore-errors (cond ;; A simple function. - ((functionp (car actions)) - (funcall (car actions))) + ((functionp action) + (funcall action)) ;; Something to be evaled. (t - (eval (car actions))))) - (pop actions))) + (eval action)))))) (defsubst message-maybe-split-and-send-mail () "Split a message if necessary, and send it via mail. @@ -5858,7 +5855,7 @@ they are." ;; When sending via news, make sure the total folded length will ;; be less than 998 characters. This is to cater to broken INN ;; 2.3 which counts the total number of characters in a header - ;; rather than the physical line length of each line, as it shuld. + ;; rather than the physical line length of each line, as it should. ;; ;; This hack should be removed when it's believed than INN 2.3 is ;; no longer widely used. @@ -6856,18 +6853,17 @@ the message." subject (nnheader-decode-subject subject)) "")) - (if message-wash-forwarded-subjects - (setq subject (message-wash-subject subject))) + (when message-wash-forwarded-subjects + (setq subject (message-wash-subject subject))) ;; Make sure funcs is a list. (and funcs (not (listp funcs)) (setq funcs (list funcs))) ;; Apply funcs in order, passing subject generated by previous ;; func to the next one. - (while funcs - (when (functionp (car funcs)) - (setq subject (funcall (car funcs) subject))) - (setq funcs (cdr funcs))) + (dolist (func funcs) + (when (functionp func) + (setq subject (funcall func subject)))) subject)))) ;;;###autoload diff --git a/lisp/nnrss.el b/lisp/nnrss.el index 665dd7d..348cb85 100644 --- a/lisp/nnrss.el +++ b/lisp/nnrss.el @@ -290,9 +290,8 @@ ARTICLE is the article number of the current headline.") (defvar nnrss-extra-categories '(nnrss-snarf-moreover-categories)) (defun nnrss-generate-active () - (if (y-or-n-p "Fetch extra categories? ") - (dolist (func nnrss-extra-categories) - (funcall func))) + (when (y-or-n-p "Fetch extra categories? ") + (mapc 'funcall nnrss-extra-categories)) (save-excursion (set-buffer nntp-server-buffer) (erase-buffer)