From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: Warning: `mapcar' called for effect; use `mapc' or `dolist' Date: Tue, 23 Oct 2007 20:28:47 +0900 Message-ID: References: <200710200643.l9K6h9gk021348@oogie-boogie.ics.uci.edu> <200710222007.l9MK7fRZ022140@oogie-boogie.ics.uci.edu> <87ve8y4pab.fsf@catnip.gol.com> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193138947 32562 80.91.229.12 (23 Oct 2007 11:29:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Oct 2007 11:29:07 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 23 13:29:08 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 1IkHwZ-0006f0-MS for ged-emacs-devel@m.gmane.org; Tue, 23 Oct 2007 13:29:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IkHwR-0006dZ-Ld for ged-emacs-devel@m.gmane.org; Tue, 23 Oct 2007 07:28:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IkHwN-0006bR-Nf for emacs-devel@gnu.org; Tue, 23 Oct 2007 07:28:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IkHwL-0006aO-VN for emacs-devel@gnu.org; Tue, 23 Oct 2007 07:28:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IkHwL-0006aF-OI for emacs-devel@gnu.org; Tue, 23 Oct 2007 07:28:53 -0400 Original-Received: from tyo201.gate.nec.co.jp ([202.32.8.193]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IkHwI-0006yp-1J; Tue, 23 Oct 2007 07:28:50 -0400 Original-Received: from relay21.aps.necel.com ([10.29.19.50]) by tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id l9NBSjx1028855; Tue, 23 Oct 2007 20:28:48 +0900 (JST) Original-Received: from relay11.aps.necel.com ([10.29.19.24] [10.29.19.24]) by relay21.aps.necel.com with ESMTP; Tue, 23 Oct 2007 20:28:48 +0900 Original-Received: from dhapc248.dev.necel.com ([10.114.112.215] [10.114.112.215]) by relay11.aps.necel.com with ESMTP; Tue, 23 Oct 2007 20:28:47 +0900 Original-Received: by dhapc248.dev.necel.com (Postfix, from userid 31295) id 6DA31B67; Tue, 23 Oct 2007 20:28:47 +0900 (JST) System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: (Richard Stallman's message of "Tue\, 23 Oct 2007 06\:39\:26 -0400") Original-Lines: 22 X-detected-kernel: by monty-python.gnu.org: Solaris 8 (1) 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:81550 Archived-At: Richard Stallman writes: > You should `defvar' mailp then. > > It would be unclean for Gnus to put a defvar on a general short name > like `mailp'. That is why I think this needs a total rewrite. In Common-Lisp, I think you use (declare (special VAR ...)) to indicate a localized use of dynamic binding (as the first thing inside the let form where it is bound). Since Elisp already uses `declare' for some other things, it would seem reasonable to also use it to inform the byte compiler that an apparently local variable is known to be accessed non-locally. [That warning is useful -- people often seem to forget to remove unused let-bindings when the code that uses them is rewritten...] -Miles -- "Whatever you do will be insignificant, but it is very important that you do it." Mahatma Gandhi