From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: Warning: `mapcar' called for effect; use `mapc' or `dolist' Date: Wed, 31 Oct 2007 17:19:23 -0400 Message-ID: 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 1193865582 12961 80.91.229.12 (31 Oct 2007 21:19:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 31 Oct 2007 21:19:42 +0000 (UTC) Cc: dann@ics.uci.edu, ding@gnus.org, Reiner Steib , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 31 22:19:44 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 1InKyU-0003dp-2k for ged-emacs-devel@m.gmane.org; Wed, 31 Oct 2007 22:19:42 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1InKyK-0006DG-3b for ged-emacs-devel@m.gmane.org; Wed, 31 Oct 2007 17:19:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1InKyH-0006D5-4n for emacs-devel@gnu.org; Wed, 31 Oct 2007 17:19:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1InKyF-0006CX-Eh for emacs-devel@gnu.org; Wed, 31 Oct 2007 17:19:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1InKyF-0006CJ-4f for emacs-devel@gnu.org; Wed, 31 Oct 2007 17:19:27 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1InKyE-0000yU-0T for emacs-devel@gnu.org; Wed, 31 Oct 2007 17:19:26 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1InKyB-0002ie-OL; Wed, 31 Oct 2007 17:19:23 -0400 X-Spook: industrial intelligence Ceridian SP4 DES domestic X-Ran: ty7[\+iLX&WFlNz X-Hue: white X-Attribution: GM User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:82255 gmane.emacs.gnus.general:65510 Archived-At: Richard Stallman wrote: > If the byte compiler warns about that case, it is being too > ambitious. Thus, if the value of an expression is stored into a > variable, the compiler should consider the value "used". > > So if this warning really happens, it is a bug. Can it be > reproduced? There's nothing to worry about AFAICS: (let ((foo (mapcar (lambda (e) e) '(a b c))))) ; warning (let ((foo (mapcar (lambda (e) e) '(a b c)))) ; no warning foo) (defvar foo nil) (defun foo-func () foo) (let ((foo (mapcar (lambda (e) e) '(a b c)))) ; no warning (foo-func))