From ac78c4d5143ba0ed346e8bc5fcd189cb519175e1 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Sun, 25 Apr 2004 22:17:35 +0000 Subject: [PATCH] SYnch to No Gnus 200404251801. --- lisp/ChangeLog | 49 ++++++++++++++++++++++++++++ lisp/gnus-group.el | 5 ++- lisp/gnus-int.el | 2 +- lisp/gnus-nocem.el | 2 +- lisp/gnus-score.el | 7 ++-- lisp/gnus-sum.el | 5 ++- lisp/gnus-topic.el | 5 ++- lisp/gnus-uu.el | 2 +- lisp/mm-view.el | 22 ++++++------- lisp/mml.el | 4 +-- lisp/nnfolder.el | 20 ++++++------ lisp/nnimap.el | 42 ++++++++++++------------ lisp/nnmh.el | 23 ++++++------- lisp/nnml.el | 20 ++++++------ lisp/nnrss.el | 88 +++++++++++++++++++++++++------------------------- lisp/nnspool.el | 3 +- lisp/nnvirtual.el | 55 ++++++++++++++++--------------- lisp/nnweb.el | 2 +- lisp/sieve-manage.el | 2 +- lisp/spam-stat.el | 2 +- 20 files changed, 197 insertions(+), 163 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 02bd0fe..c29f066 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,52 @@ +2004-04-25 Jesper Harder + + * spam-stat.el (spam-stat-score-buffer): Simplify mapcar usage. + Use mapc when appropriate. + + * sieve-manage.el (sieve-manage-open): do. + + * nnweb.el (nnweb-insert-html): do. + + * nnvirtual.el (nnvirtual-catchup-group, nnvirtual-partition-sequence) + (nnvirtual-partition-sequence, nnvirtual-create-mapping): do. + + * nnspool.el (nnspool-request-group): do. + + * nnrss.el (nnrss-opml-export, nnrss-find-el, nnrss-order-hrefs): + do. + + * nnml.el (nnml-request-update-info): do. + + * nnmh.el (nnmh-request-group, nnmh-request-list-1, nnmh-active-number) + (nnmh-request-create-group, nnmh-update-gnus-unreads): do. + + * nnimap.el (nnimap-request-close, nnimap-acl-edit) + (nnimap-request-set-mark): do. + + * nnfolder.el (nnfolder-request-update-info): do. + + * mm-view.el (mm-pkcs7-signed-magic, mm-pkcs7-enveloped-magic): + do. + + * mml.el (mml-destroy-buffers, mml-compute-boundary-1): do. + + * gnus-uu.el (gnus-uu-find-articles-matching): do. + + * gnus-topic.el (gnus-topic-check-topology, gnus-topic-remove-group): + do. + + * gnus-sum.el (gnus-summary-fetch-faq, gnus-read-move-group-name): + do. + + * gnus-score.el (gnus-score-load-file, gnus-sort-score-files): do. + + * gnus-nocem.el (gnus-nocem-scan-groups): do. + + * gnus-int.el (gnus-start-news-server): do. + + * gnus-group.el (gnus-group-make-kiboze-group) + (gnus-group-browse-foreign-server): do. + 2004-04-22 Teodor Zlatanov * spam.el (spam-necessary-extra-headers): get the extra headers we diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index eb55584..0f832ae 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -2732,7 +2732,7 @@ score file entries for articles to include in the group." (list (read-string "nnkiboze group name: ") (read-string "Source groups (regexp): ") - (let ((headers (mapcar (lambda (group) (list group)) + (let ((headers (mapcar 'list '("subject" "from" "number" "date" "message-id" "references" "chars" "lines" "xref" "followup" "all" "body" "head"))) @@ -4061,8 +4061,7 @@ and the second element is the address." ;; Suggested by mapjph@bath.ac.uk. (completing-read "Address: " - (mapcar (lambda (server) (list server)) - gnus-secondary-servers))) + (mapcar 'list gnus-secondary-servers))) ;; We got a server name. how)))) (gnus-browse-foreign-server method)) diff --git a/lisp/gnus-int.el b/lisp/gnus-int.el index 2801d43..9ab6afd 100644 --- a/lisp/gnus-int.el +++ b/lisp/gnus-int.el @@ -74,7 +74,7 @@ If CONFIRM is non-nil, the user will be asked for an NNTP server." ;; Read server name with completion. (setq gnus-nntp-server (completing-read "NNTP server: " - (mapcar (lambda (server) (list server)) + (mapcar 'list (cons (list gnus-nntp-server) gnus-secondary-servers)) nil nil gnus-nntp-server))) diff --git a/lisp/gnus-nocem.el b/lisp/gnus-nocem.el index e36c25d..bbaf550 100644 --- a/lisp/gnus-nocem.el +++ b/lisp/gnus-nocem.el @@ -190,7 +190,7 @@ valid issuer, which is much faster if you are selective about the issuers." (and gnus-nocem-check-from (let ((case-fold-search t)) (catch 'ok - (mapcar + (mapc (lambda (author) (if (consp author) (setq author (car author))) diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index 9d58e09..b1502e5 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -1246,8 +1246,7 @@ If FORMAT, also format the current score file." ;; files. (when (and files (not global)) (setq lists (apply 'append lists - (mapcar (lambda (file) - (gnus-score-load-file file)) + (mapcar 'gnus-score-load-file (if adapt-file (cons adapt-file files) files))))) (when (and eval (not global)) @@ -2799,9 +2798,7 @@ Destroys the current buffer." (lambda (file) (cons (inline (gnus-score-file-rank file)) file)) files))) - (mapcar - (lambda (f) (cdr f)) - (sort alist 'car-less-than-car))))) + (mapcar 'cdr (sort alist 'car-less-than-car))))) (defun gnus-score-find-alist (group) "Return list of score files for GROUP. diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index c592d35..24b01ca 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -6868,7 +6868,7 @@ in." (when current-prefix-arg (completing-read "FAQ dir: " (and (listp gnus-group-faq-directory) - (mapcar (lambda (file) (list file)) + (mapcar 'list gnus-group-faq-directory)))))) (let (gnus-faq-buffer) (when (setq gnus-faq-buffer @@ -11130,8 +11130,7 @@ save those articles instead." (t (gnus-completing-read-with-default nil prom - (mapcar (lambda (el) (list el)) - (nreverse split-name)) + (mapcar 'list (nreverse split-name)) nil nil nil 'gnus-group-history)))) (to-method (gnus-server-to-method (gnus-group-method to-newsgroup)))) diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index c9f4116..f16d899 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -840,8 +840,7 @@ articles in the topic and its subtopics." (pop topics))) ;; Go through all living groups and make sure that ;; they belong to some topic. - (let* ((tgroups (apply 'append (mapcar (lambda (entry) (cdr entry)) - gnus-topic-alist))) + (let* ((tgroups (apply 'append (mapcar 'cdr gnus-topic-alist))) (entry (last (assoc (caar gnus-topic-topology) gnus-topic-alist))) (newsrc (cdr gnus-newsrc-alist)) group) @@ -1313,7 +1312,7 @@ If COPYP, copy the groups instead." (let ((use-marked (and (not n) (not (gnus-region-active-p)) gnus-group-marked t)) (groups (gnus-group-process-prefix n))) - (mapcar + (mapc (lambda (group) (gnus-group-remove-mark group use-marked) (let ((topicl (assoc (gnus-current-topic) gnus-topic-alist)) diff --git a/lisp/gnus-uu.el b/lisp/gnus-uu.el index a9e60bc..9b9f87e 100644 --- a/lisp/gnus-uu.el +++ b/lisp/gnus-uu.el @@ -1126,7 +1126,7 @@ When called interactively, prompt for REGEXP." ;; Expand numbers, sort, and return the list of article ;; numbers. - (mapcar (lambda (sub) (cdr sub)) + (mapcar 'cdr (sort (gnus-uu-expand-numbers list-of-subjects (not do-not-translate)) diff --git a/lisp/mm-view.el b/lisp/mm-view.el index e319f2a..4bced35 100644 --- a/lisp/mm-view.el +++ b/lisp/mm-view.el @@ -499,23 +499,21 @@ ;; us(840) rsadsi(113549) pkcs(1) pkcs7(7) 2 } (defvar mm-pkcs7-signed-magic (mm-string-as-unibyte - (apply 'concat - (mapcar 'char-to-string - (list ?\x30 ?\x5c ?\x28 ?\x80 ?\x5c ?\x7c ?\x81 ?\x2e ?\x5c - ?\x7c ?\x82 ?\x2e ?\x2e ?\x5c ?\x7c ?\x83 ?\x2e ?\x2e - ?\x2e ?\x5c ?\x29 ?\x06 ?\x09 ?\x5c ?\x2a ?\x86 ?\x48 - ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x02))))) + (mapconcat 'char-to-string + (list ?\x30 ?\x5c ?\x28 ?\x80 ?\x5c ?\x7c ?\x81 ?\x2e ?\x5c + ?\x7c ?\x82 ?\x2e ?\x2e ?\x5c ?\x7c ?\x83 ?\x2e ?\x2e + ?\x2e ?\x5c ?\x29 ?\x06 ?\x09 ?\x5c ?\x2a ?\x86 ?\x48 + ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x02) ""))) ;; id-envelopedData OBJECT IDENTIFIER ::= { iso(1) member-body(2) ;; us(840) rsadsi(113549) pkcs(1) pkcs7(7) 3 } (defvar mm-pkcs7-enveloped-magic (mm-string-as-unibyte - (apply 'concat - (mapcar 'char-to-string - (list ?\x30 ?\x5c ?\x28 ?\x80 ?\x5c ?\x7c ?\x81 ?\x2e ?\x5c - ?\x7c ?\x82 ?\x2e ?\x2e ?\x5c ?\x7c ?\x83 ?\x2e ?\x2e - ?\x2e ?\x5c ?\x29 ?\x06 ?\x09 ?\x5c ?\x2a ?\x86 ?\x48 - ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x03))))) + (mapconcat 'char-to-string + (list ?\x30 ?\x5c ?\x28 ?\x80 ?\x5c ?\x7c ?\x81 ?\x2e ?\x5c + ?\x7c ?\x82 ?\x2e ?\x2e ?\x5c ?\x7c ?\x83 ?\x2e ?\x2e + ?\x2e ?\x5c ?\x29 ?\x06 ?\x09 ?\x5c ?\x2a ?\x86 ?\x48 + ?\x86 ?\xf7 ?\x0d ?\x01 ?\x07 ?\x03) ""))) (defun mm-view-pkcs7-get-type (handle) (mm-with-unibyte-buffer diff --git a/lisp/mml.el b/lisp/mml.el index 81f7f5f..68370d6 100644 --- a/lisp/mml.el +++ b/lisp/mml.el @@ -132,7 +132,7 @@ one charsets.") (defun mml-destroy-buffers () (let (kill-buffer-hook) - (mapcar 'kill-buffer mml-buffer-list) + (mapc 'kill-buffer mml-buffer-list) (setq mml-buffer-list nil))) (defun mml-parse () @@ -596,7 +596,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (incf mml-multipart-number))) (throw 'not-unique nil)))) ((eq (car cont) 'multipart) - (mapcar 'mml-compute-boundary-1 (cddr cont)))) + (mapc 'mml-compute-boundary-1 (cddr cont)))) t)) (defun mml-make-boundary (number) diff --git a/lisp/nnfolder.el b/lisp/nnfolder.el index 08ae99c..cad461a 100644 --- a/lisp/nnfolder.el +++ b/lisp/nnfolder.el @@ -1196,16 +1196,16 @@ This command does not work if you use short group names." (nnheader-message 8 "Updating marks for %s..." group) (nnfolder-open-marks group server) ;; Update info using `nnfolder-marks'. - (mapcar (lambda (pred) - (unless (memq (cdr pred) gnus-article-unpropagated-mark-lists) - (gnus-info-set-marks - info - (gnus-update-alist-soft - (cdr pred) - (cdr (assq (cdr pred) nnfolder-marks)) - (gnus-info-marks info)) - t))) - gnus-article-mark-lists) + (mapc (lambda (pred) + (unless (memq (cdr pred) gnus-article-unpropagated-mark-lists) + (gnus-info-set-marks + info + (gnus-update-alist-soft + (cdr pred) + (cdr (assq (cdr pred) nnfolder-marks)) + (gnus-info-marks info)) + t))) + gnus-article-mark-lists) (let ((seen (cdr (assq 'read nnfolder-marks)))) (gnus-info-set-read info (if (and (integerp (car seen)) diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 4c5d718..91a1a2b 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -831,8 +831,8 @@ Return nil if the server couldn't be closed for some reason." All buffers that have been created by that backend should be killed. (Not the nntp-server-buffer, though.) This function is generally only called when Gnus is shutting down." - (mapcar (lambda (server) (nnimap-close-server (car server))) - nnimap-server-buffer-alist) + (mapc (lambda (server) (nnimap-close-server (car server))) + nnimap-server-buffer-alist) (setq nnimap-server-buffer-alist nil)) (deffoo nnimap-status-message (&optional server) @@ -1218,11 +1218,11 @@ function is generally only called when Gnus is shutting down." (if (memq 'dormant cmdmarks) (setq cmdmarks (cons 'tick cmdmarks)))) ;; remove stuff we are forbidden to store - (mapcar (lambda (mark) - (if (imap-message-flag-permanent-p - (nnimap-mark-to-flag mark)) - (setq marks (cons mark marks)))) - cmdmarks) + (mapc (lambda (mark) + (if (imap-message-flag-permanent-p + (nnimap-mark-to-flag mark)) + (setq marks (cons mark marks)))) + cmdmarks) (when (and range marks) (cond ((eq what 'del) (imap-message-flags-del @@ -1551,21 +1551,21 @@ function is generally only called when Gnus is shutting down." (error "Your server does not support ACL editing")) (with-current-buffer nnimap-server-buffer ;; delete all removed identifiers - (mapcar (lambda (old-acl) - (unless (assoc (car old-acl) new-acls) - (or (imap-mailbox-acl-delete (car old-acl) mailbox) - (error "Can't delete ACL for %s" (car old-acl))))) - old-acls) + (mapc (lambda (old-acl) + (unless (assoc (car old-acl) new-acls) + (or (imap-mailbox-acl-delete (car old-acl) mailbox) + (error "Can't delete ACL for %s" (car old-acl))))) + old-acls) ;; set all changed acl's - (mapcar (lambda (new-acl) - (let ((new-rights (cdr new-acl)) - (old-rights (cdr (assoc (car new-acl) old-acls)))) - (unless (and old-rights new-rights - (string= old-rights new-rights)) - (or (imap-mailbox-acl-set (car new-acl) new-rights mailbox) - (error "Can't set ACL for %s to %s" (car new-acl) - new-rights))))) - new-acls) + (mapc (lambda (new-acl) + (let ((new-rights (cdr new-acl)) + (old-rights (cdr (assoc (car new-acl) old-acls)))) + (unless (and old-rights new-rights + (string= old-rights new-rights)) + (or (imap-mailbox-acl-set (car new-acl) new-rights mailbox) + (error "Can't set ACL for %s to %s" (car new-acl) + new-rights))))) + new-acls) t))) diff --git a/lisp/nnmh.el b/lisp/nnmh.el index ba31475..11a4f86 100644 --- a/lisp/nnmh.el +++ b/lisp/nnmh.el @@ -178,7 +178,7 @@ as unread by Gnus.") (nnheader-re-read-dir pathname) (setq dir (sort - (mapcar (lambda (name) (string-to-int name)) + (mapcar 'string-to-int (directory-files pathname nil "^[0-9]+$" t)) '<)) (cond @@ -225,9 +225,8 @@ as unread by Gnus.") (nnmh-request-list-1 rdir)))) ;; For each directory, generate an active file line. (unless (string= (expand-file-name nnmh-toplev) dir) - (let ((files (mapcar - (lambda (name) (string-to-int name)) - (directory-files dir nil "^[0-9]+$" t)))) + (let ((files (mapcar 'string-to-int + (directory-files dir nil "^[0-9]+$" t)))) (when files (save-excursion (set-buffer nntp-server-buffer) @@ -360,11 +359,9 @@ as unread by Gnus.") nnmh-group-alist) (nnmh-possibly-create-directory group) (nnmh-possibly-change-directory group server) - (let ((articles (mapcar - (lambda (file) - (string-to-int file)) - (directory-files - nnmh-current-directory nil "^[0-9]+$")))) + (let ((articles (mapcar 'string-to-int + (directory-files + nnmh-current-directory nil "^[0-9]+$")))) (when articles (setcar active (apply 'min articles)) (setcdr active (apply 'max articles)))))) @@ -488,10 +485,8 @@ as unread by Gnus.") (gnus-make-directory dir)) ;; Find the highest number in the group. (let ((files (sort - (mapcar - (lambda (f) - (string-to-int f)) - (directory-files dir nil "^[0-9]+$")) + (mapcar 'string-to-int + (directory-files dir nil "^[0-9]+$")) '>))) (when files (setcdr active (car files))))) @@ -513,7 +508,7 @@ as unread by Gnus.") ;; articles in this folder. The articles that are "new" will be ;; marked as unread by Gnus. (let* ((dir nnmh-current-directory) - (files (sort (mapcar (function (lambda (name) (string-to-int name))) + (files (sort (mapcar 'string-to-int (directory-files nnmh-current-directory nil "^[0-9]+$" t)) '<)) diff --git a/lisp/nnml.el b/lisp/nnml.el index 38bcd58..7b6713f 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -942,16 +942,16 @@ Use the nov database for the current group if available." (nnheader-message 8 "Updating marks for %s..." group) (nnml-open-marks group server) ;; Update info using `nnml-marks'. - (mapcar (lambda (pred) - (unless (memq (cdr pred) gnus-article-unpropagated-mark-lists) - (gnus-info-set-marks - info - (gnus-update-alist-soft - (cdr pred) - (cdr (assq (cdr pred) nnml-marks)) - (gnus-info-marks info)) - t))) - gnus-article-mark-lists) + (mapc (lambda (pred) + (unless (memq (cdr pred) gnus-article-unpropagated-mark-lists) + (gnus-info-set-marks + info + (gnus-update-alist-soft + (cdr pred) + (cdr (assq (cdr pred) nnml-marks)) + (gnus-info-marks info)) + t))) + gnus-article-mark-lists) (let ((seen (cdr (assq 'read nnml-marks)))) (gnus-info-set-read info (if (and (integerp (car seen)) diff --git a/lisp/nnrss.el b/lisp/nnrss.el index de4a5a9..d2a8cf9 100644 --- a/lisp/nnrss.el +++ b/lisp/nnrss.el @@ -484,11 +484,11 @@ Export subscriptions to a buffer in OPML Format." " " (user-full-name) "\n" " \n" " \n")) - (mapcar (lambda (sub) - (insert (concat - " \n"))) - nnrss-group-alist) + (mapc (lambda (sub) + (insert (concat + " \n"))) + nnrss-group-alist) (insert (concat " \n" "\n"))) @@ -565,24 +565,24 @@ It is useful when `(setq nnrss-use-local t)'." (defun nnrss-find-el (tag data &optional found-list) "Find the all matching elements in the data. Careful with this on large documents!" - (if (listp data) - (mapcar (lambda (bit) - (when (car-safe bit) - (when (equal tag (car bit)) - (setq found-list - (append found-list - (list bit)))) - (if (and (listp (car-safe (caddr bit))) - (not (stringp (caddr bit)))) - (setq found-list - (append found-list - (nnrss-find-el - tag (caddr bit)))) - (setq found-list - (append found-list - (nnrss-find-el - tag (cddr bit))))))) - data)) + (when (listp data) + (mapc (lambda (bit) + (when (car-safe bit) + (when (equal tag (car bit)) + (setq found-list + (append found-list + (list bit)))) + (if (and (listp (car-safe (caddr bit))) + (not (stringp (caddr bit)))) + (setq found-list + (append found-list + (nnrss-find-el + tag (caddr bit)))) + (setq found-list + (append found-list + (nnrss-find-el + tag (cddr bit))))))) + data)) found-list) (defun nnrss-rsslink-p (el) @@ -629,27 +629,27 @@ whether they are `offsite' or `onsite'." rss-onsite-in rdf-onsite-in xml-onsite-in rss-offsite-end rdf-offsite-end xml-offsite-end rss-offsite-in rdf-offsite-in xml-offsite-in) - (mapcar (lambda (href) - (if (not (null href)) - (cond ((string-match "\\.rss$" href) - (nnrss-match-macro - base-uri href rss-onsite-end rss-offsite-end)) - ((string-match "\\.rdf$" href) - (nnrss-match-macro - base-uri href rdf-onsite-end rdf-offsite-end)) - ((string-match "\\.xml$" href) - (nnrss-match-macro - base-uri href xml-onsite-end xml-offsite-end)) - ((string-match "rss" href) - (nnrss-match-macro - base-uri href rss-onsite-in rss-offsite-in)) - ((string-match "rdf" href) - (nnrss-match-macro - base-uri href rdf-onsite-in rdf-offsite-in)) - ((string-match "xml" href) - (nnrss-match-macro - base-uri href xml-onsite-in xml-offsite-in))))) - hrefs) + (mapc (lambda (href) + (if (not (null href)) + (cond ((string-match "\\.rss$" href) + (nnrss-match-macro + base-uri href rss-onsite-end rss-offsite-end)) + ((string-match "\\.rdf$" href) + (nnrss-match-macro + base-uri href rdf-onsite-end rdf-offsite-end)) + ((string-match "\\.xml$" href) + (nnrss-match-macro + base-uri href xml-onsite-end xml-offsite-end)) + ((string-match "rss" href) + (nnrss-match-macro + base-uri href rss-onsite-in rss-offsite-in)) + ((string-match "rdf" href) + (nnrss-match-macro + base-uri href rdf-onsite-in rdf-offsite-in)) + ((string-match "xml" href) + (nnrss-match-macro + base-uri href xml-onsite-in xml-offsite-in))))) + hrefs) (append rss-onsite-end rdf-onsite-end xml-onsite-end rss-onsite-in rdf-onsite-in xml-onsite-in diff --git a/lisp/nnspool.el b/lisp/nnspool.el index 67b6f0d..94fccc7 100644 --- a/lisp/nnspool.el +++ b/lisp/nnspool.el @@ -244,8 +244,7 @@ there.") ;; Yes, completely empty spool directories *are* possible. ;; Fix by Sudish Joseph (when (setq dir (directory-files pathname nil "^[0-9]+$" t)) - (setq dir - (sort (mapcar (lambda (name) (string-to-int name)) dir) '<))) + (setq dir (sort (mapcar 'string-to-int dir) '<))) (if dir (nnheader-insert "211 %d %d %d %s\n" (length dir) (car dir) diff --git a/lisp/nnvirtual.el b/lisp/nnvirtual.el index fc9f374..adb28ca 100644 --- a/lisp/nnvirtual.el +++ b/lisp/nnvirtual.el @@ -339,7 +339,7 @@ component group will show up when you enter the virtual group.") (let ((gnus-group-marked (copy-sequence nnvirtual-component-groups)) (gnus-expert-user t)) ;; Make sure all groups are activated. - (mapcar + (mapc (lambda (g) (when (not (numberp (gnus-group-unread g))) (gnus-activate-group g))) @@ -664,8 +664,7 @@ numbers has no corresponding component article, then it is left out of the result." (when (numberp (cdr-safe articles)) (setq articles (list articles))) - (let ((carticles (mapcar (lambda (g) (list g)) - nnvirtual-component-groups)) + (let ((carticles (mapcar 'list nnvirtual-component-groups)) a i j article entry) (while (setq a (pop articles)) (if (atom a) @@ -678,8 +677,8 @@ the result." (setq entry (assoc (car article) carticles)) (setcdr entry (cons (cdr article) (cdr entry)))) (setq i (1+ i)))) - (mapcar (lambda (x) (setcdr x (nreverse (cdr x)))) - carticles) + (mapc (lambda (x) (setcdr x (nreverse (cdr x)))) + carticles) carticles)) @@ -701,29 +700,29 @@ based on the marks on the component groups." ;; Into all-unreads we put (g unreads). ;; Into all-marks we put (g marks). ;; We also increment cnt and tot here, and compute M (max of sizes). - (mapcar (lambda (g) - (setq active (gnus-activate-group g) - min (car active) - max (cdr active)) - (when (and active (>= max min) (not (zerop max))) - ;; store active information - (push (list g (- max min -1) max) actives) - ;; collect unread/mark info for later - (setq unreads (gnus-list-of-unread-articles g)) - (setq marks (gnus-info-marks (gnus-get-info g))) - (when gnus-use-cache - (push (cons 'cache - (gnus-cache-articles-in-group g)) - marks)) - (push (cons g unreads) all-unreads) - (push (cons g marks) all-marks) - ;; count groups, total #articles, and max size - (setq size (- max min -1)) - (setq cnt (1+ cnt) - tot (+ tot size) - M (max M size)))) - nnvirtual-component-groups) - + (mapc (lambda (g) + (setq active (gnus-activate-group g) + min (car active) + max (cdr active)) + (when (and active (>= max min) (not (zerop max))) + ;; store active information + (push (list g (- max min -1) max) actives) + ;; collect unread/mark info for later + (setq unreads (gnus-list-of-unread-articles g)) + (setq marks (gnus-info-marks (gnus-get-info g))) + (when gnus-use-cache + (push (cons 'cache + (gnus-cache-articles-in-group g)) + marks)) + (push (cons g unreads) all-unreads) + (push (cons g marks) all-marks) + ;; count groups, total #articles, and max size + (setq size (- max min -1)) + (setq cnt (1+ cnt) + tot (+ tot size) + M (max M size)))) + nnvirtual-component-groups) + ;; Number of articles in the virtual group. (setq nnvirtual-mapping-len tot) diff --git a/lisp/nnweb.el b/lisp/nnweb.el index f8cbdd7..c6d4d3f 100644 --- a/lisp/nnweb.el +++ b/lisp/nnweb.el @@ -533,7 +533,7 @@ Valid types include `google', `dejanews', and `gmane'.") (nth 1 parse) " ")) (insert ">\n") - (mapcar 'nnweb-insert-html (nth 2 parse)) + (mapc 'nnweb-insert-html (nth 2 parse)) (insert "\n"))) (defun nnweb-parse-find (type parse &optional maxdepth) diff --git a/lisp/sieve-manage.el b/lisp/sieve-manage.el index 23fb436..63588b8 100644 --- a/lisp/sieve-manage.el +++ b/lisp/sieve-manage.el @@ -433,7 +433,7 @@ Optional variable BUFFER is buffer (buffer, or string naming buffer) to work in." (setq buffer (or buffer (format " *sieve* %s:%d" server (or port 2000)))) (with-current-buffer (get-buffer-create buffer) - (mapcar 'make-variable-buffer-local sieve-manage-local-variables) + (mapc 'make-variable-buffer-local sieve-manage-local-variables) (sieve-manage-disable-multibyte) (buffer-disable-undo) (setq sieve-manage-server (or server sieve-manage-server)) diff --git a/lisp/spam-stat.el b/lisp/spam-stat.el index 2fdad4e..0038731 100644 --- a/lisp/spam-stat.el +++ b/lisp/spam-stat.el @@ -463,7 +463,7 @@ where DIFF is the difference between SCORE and 0.5." (defun spam-stat-score-buffer () "Return a score describing the spam-probability for this buffer." (setq spam-stat-score-data (spam-stat-buffer-words-with-scores)) - (let* ((probs (mapcar (lambda (e) (cadr e)) spam-stat-score-data)) + (let* ((probs (mapcar 'cadr spam-stat-score-data)) (prod (apply #'* probs))) (/ prod (+ prod (apply #'* (mapcar #'(lambda (x) (- 1 x)) probs)))))) -- 1.7.10.4