From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65440 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: Warning: `mapcar' called for effect; use `mapc' or `dolist' Date: Mon, 22 Oct 2007 14:04:38 -0700 Message-ID: <200710222104.l9ML4cah025247@oogie-boogie.ics.uci.edu> References: <200710200643.l9K6h9gk021348@oogie-boogie.ics.uci.edu> <200710222007.l9MK7fRZ022140@oogie-boogie.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193087198 23733 80.91.229.12 (22 Oct 2007 21:06:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Oct 2007 21:06:38 +0000 (UTC) Cc: 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 23:06:39 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 1Ik4TW-00005t-DL for ged-emacs-devel@m.gmane.org; Mon, 22 Oct 2007 23:06:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ik4TO-0002CU-Jn for ged-emacs-devel@m.gmane.org; Mon, 22 Oct 2007 17:06:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ik4TL-0002CP-Lz for emacs-devel@gnu.org; Mon, 22 Oct 2007 17:06:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ik4TJ-0002CD-Gi for emacs-devel@gnu.org; Mon, 22 Oct 2007 17:06:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ik4TJ-0002CA-E8 for emacs-devel@gnu.org; Mon, 22 Oct 2007 17:06:01 -0400 Original-Received: from oogie-boogie.ics.uci.edu ([128.195.1.41]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ik4TI-0006b8-Qz for emacs-devel@gnu.org; Mon, 22 Oct 2007 17:06:01 -0400 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by oogie-boogie.ics.uci.edu (8.13.6/8.13.6) with ESMTP id l9ML4cah025247; Mon, 22 Oct 2007 14:04:38 -0700 (PDT) In-Reply-To: (Reiner Steib's message of "Mon\, 22 Oct 2007 22\:55\:29 +0200") Original-Lines: 29 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-kernel: by monty-python.gnu.org: Solaris 9 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:81479 gmane.emacs.gnus.general:65440 Archived-At: Reiner Steib writes: > On Mon, Oct 22 2007, Dan Nicolaescu wrote: > > > Reiner Steib writes: > > > On Mon, Oct 22 2007, Katsumi Yamaoka wrote: > > > > 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'." > [...] > > It seems that `mailp' is not used in that function. > > `mailp' is used implicitly through the variable `gnus-group-highlight' > which is let-bound to `list'. `list' is used in the body of the > let-form. > > > Adding a use for it makes the warning go away... > > Hm, I can't reproduce the warning using `emacs-lisp-byte-compile' with > GNU Emacs 23.0.50.6 (i686-pc-linux-gnu, GTK+ Version 2.10.6) of 2007-10-20. > Too old? I can't either. I thought that adding a use for mailp fixed the warning for me, I didn't try it before that.