From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65435 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: Warning: `mapcar' called for effect; use `mapc' or `dolist' Date: Mon, 22 Oct 2007 20:49:27 +0200 Message-ID: References: <200710200643.l9K6h9gk021348@oogie-boogie.ics.uci.edu> Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193080262 31246 80.91.229.12 (22 Oct 2007 19:11:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Oct 2007 19:11:02 +0000 (UTC) Cc: Dan Nicolaescu , emacs-devel@gnu.org To: ding@gnus.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 22 21:11:02 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ik2fv-0001VX-CT for ged-emacs-devel@m.gmane.org; Mon, 22 Oct 2007 21:10:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ik2fm-0000uG-Dm for ged-emacs-devel@m.gmane.org; Mon, 22 Oct 2007 15:10:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ik2fg-0000sb-JQ for emacs-devel@gnu.org; Mon, 22 Oct 2007 15:10:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ik2fc-0000qw-RQ for emacs-devel@gnu.org; Mon, 22 Oct 2007 15:10:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ik2fc-0000qt-NC for emacs-devel@gnu.org; Mon, 22 Oct 2007 15:10:36 -0400 Original-Received: from mail.uni-ulm.de ([134.60.1.11]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Ik2fc-00006M-5X for emacs-devel@gnu.org; Mon, 22 Oct 2007 15:10:36 -0400 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by mail.uni-ulm.de (8.14.1/8.14.1) with ESMTP id l9MJAPbD024230; Mon, 22 Oct 2007 21:10:26 +0200 (MEST) Original-Received: from localhost (bridgekeeper.physik.uni-ulm.de [134.60.41.37]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id 911C712C67; Mon, 22 Oct 2007 21:10:24 +0200 (CEST) X-Face: #vK]N[`vqjuod*|)'[iD7/"3AB-ApT%fmN"LWAg@oS7OesGv~)n[OBTLM#I="J'Y^-7I I/ps7o_'IK@#-Rs{::DZ@O8yS|fexe,XslY[:dNWOb~>?mC-&i_c)say:"\IpA.5U.b]'NY; Pks{lb h.+#6%DpZuaK3dcHB`Av3zc:r!C%~s0&m, tWj]&}, qg.+0ww2gK%f!:GK|wMl.I!(voY*1"^li8"~B BNG)9LvPi?^DMR-GVDnZqhu*3Hi, +g=wFhI)BL6&u{EOVEHjVEVq~d?_}lMntWAc3(6?kftjc>_f>! g0wM(qPM$d5]^TT_Qyi&L?LGVG)SHN;Gk/,pkY9,~ In-Reply-To: (Katsumi Yamaoka's message of "Mon, 22 Oct 2007 21:13:39 +0900") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) X-DCC-INFN-TO-Metrics: poseidon 1233; Body=3 Fuz1=3 Fuz2=3 X-Virus-Scanned: by amavisd-new X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:81474 gmane.emacs.gnus.general:65435 Archived-At: On Mon, Oct 22 2007, Katsumi Yamaoka wrote: >>>>>> Dan Nicolaescu wrote: >> The subject is about a new warning produced by the byte >> compiler. There's a lot of those for gnus. >> Assuming that all emacs versions that gnus wants to support have >> either mapc or dolist, can somebody please take care of these >> warnings? > >> Thanks > > With No Gnus v0.7 I did `cd lisp; make warn' and tried replacing > of `mapcar' with `mapc', `dolist', or `while' loops for a while, > and realized it's not easy and not safe. Ones who do it will > need to study what things using `mapcar' do in all cases. For > instance, `mapcar' used in `gnus-group-highlight-line' cannot be > replaced with `mapc' even if the compiler warns it. Could the byte-compiler be improved not to warn about such cases? Here's the relevant code: (defun gnus-group-highlight-line () "Highlight the current line according to `gnus-group-highlight'." (let* ([...] (mailp (apply 'append (mapcar (lambda (x) (memq x (assoc (symbol-name (car (or method gnus-select-method))) gnus-valid-select-methods))) '(mail post-mail)))) (level (or (gnus-info-level info) gnus-level-killed)) > In addition, we'd better use `while' loops (or `dolist') rather than > `mapc' because it is faster, though it needs more work. I think > it's worth working anyway but it will take time. Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/