From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: elisp errors Date: Sat, 31 Jan 2009 21:58:06 -0500 Organization: A noiseless patient Spider Message-ID: References: <26488aad-8ff8-4dda-bda5-ce5036de3617@w39g2000prb.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1233459646 28130 80.91.229.12 (1 Feb 2009 03:40:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 1 Feb 2009 03:40:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 01 04:42:00 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LTTDa-0000AE-Tm for geh-help-gnu-emacs@m.gmane.org; Sun, 01 Feb 2009 04:41:59 +0100 Original-Received: from localhost ([127.0.0.1]:36595 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LTTCI-00041x-Ez for geh-help-gnu-emacs@m.gmane.org; Sat, 31 Jan 2009 22:40:38 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!news.motzarella.org!motzarella.org!news.motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-X-Trace: news.eternal-september.org U2FsdGVkX1/qriqfslFFpOEPNLyyuXyDjpt6v5lo8uLTNr9tL3AanZ8l1Py0zAvo+/wbvhunVJJt4mJe05+NTDhLa/fY35sW+MzrNFdcF4cwyYLkwHbAyUHGIJxVF58togIZL/B8GQI= Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Sun, 1 Feb 2009 02:58:06 +0000 (UTC) X-Auth-Sender: U2FsdGVkX19y1JYlnlON9l9EYyJyXAjkCWirQ1QSDlQ= Cancel-Lock: sha1:zTjDMnGfM2Y7w2sBaYS/+Nj9O4A= User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Mail-Copies-To: nobody Original-Xref: news.stanford.edu gnu.emacs.help:166498 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61818 Archived-At: In article , Samuel Wales wrote: > On Thu, Jan 22, 2009 at 20:48, Barry Margolin wrote: > > (dotimes (i 100) > > (c-indent-command) > > (move-beginning-of-line 0) > > (next-line 1) > > (message "fin partielle")) > > Question: is this the usual approach? Seems a little strange to bind > i when it's not used, especially since emacs lisp uses dynamic extent > by default. > > A minor note: this might require 'cl, (an excellent package). > > (For those who don't know, Barry is a very experienced Common Lisper.) AFAIK, there's no variant of DOTIMES that doesn't require you to provide a variable to hold the counter. And even if there were, it would simply have to have a hidden variable of its own, although it could use a gensym to avoid potential variable shadowing problems. But there's virtually no chance that there's a global variable named i that you'll shadow with this. Just don't do something like: (dotimes (goal-column 100) ...) and you should be OK. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me *** *** PLEASE don't copy me on replies, I'll read them in the group ***