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: Fri, 23 Jan 2009 23:19:52 -0500 Organization: A noiseless patient Spider Message-ID: References: <26488aad-8ff8-4dda-bda5-ce5036de3617@w39g2000prb.googlegroups.com> <67a737d1-49d1-4e2e-8475-bf8109ea1f8f@r10g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1232772087 21380 80.91.229.12 (24 Jan 2009 04:41:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Jan 2009 04:41:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Jan 24 05:42:40 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 1LQaLu-0007zx-JT for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Jan 2009 05:42:38 +0100 Original-Received: from localhost ([127.0.0.1]:43259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQaKd-0001fn-0w for geh-help-gnu-emacs@m.gmane.org; Fri, 23 Jan 2009 23:41:19 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news.motzarella.org!motzarella.org!news.motzarella.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 51 Original-X-Trace: news.eternal-september.org U2FsdGVkX19iYlv5/wVNOFgWBwZn0yMXuef0hdx2Th+o51T25iTF1yBofGvh1Wm3bzEsv3xK1F92dyiMPVrp62aRWqnGA9Mh6XUOB8kXW74IYN0i6yO0f3aRerREc2WMH4m65qZN2tI= Original-X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers Original-NNTP-Posting-Date: Sat, 24 Jan 2009 04:19:53 +0000 (UTC) X-Auth-Sender: U2FsdGVkX181PUMA1Gq17CJzEBhZndlkAkB2K3jcjw4= Cancel-Lock: sha1:Yr24W+J9um0FhZhtNpIPYISEvio= User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Mail-Copies-To: nobody Original-Xref: news.stanford.edu gnu.emacs.help:166272 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:61594 Archived-At: In article <67a737d1-49d1-4e2e-8475-bf8109ea1f8f@r10g2000prf.googlegroups.com>, synhedionn@gmail.com wrote: > Yes , only 1 message is enough. Cool tourdotimes, I didn't know. > So accordingly to your advice: > > > (defun indentTabs() > (interactive) > ( save-excursion ; cf > http://www.cs.tut.fi/lintula/manual/elisp/emacs-lisp-intro-1.05/emacs-lisp-int > ro_13.html#SEC145 > restores point to its original position > ( message "coucou" ) > (goto-char (point-min)) > (dotimes (i 100) > (c-indent-command) > (move-beginning-of-line 0) > (next-line 1) > )(message "fin partielle") )) > > But debbuger displays still an error on c-indent-command: > Debugger entered--Lisp error: (void-function c-indent-command) > (c-indent-command) > (while (< i --dotimes-limit--) (c-indent-command) (move-beginning-of- > line 0) (next-line 1) (message "fin partielle") (setq i (1+ i))) > (let ((--dotimes-limit-- 100) (i 0)) (while (< i --dotimes-limit--) > (c-indent-command) (move-beginning-of-line 0) (next-line 1) (message > "fin partielle") (setq i ...))) > (dotimes (i 100) (c-indent-command) (move-beginning-of-line 0) (next- > line 1) (message "fin partielle")) > eval((dotimes (i 100) (c-indent-command) (move-beginning-of-line 0) > (next-line 1) (message "fin partielle"))) > eval-last-sexp-1(nil) > eval-last-sexp(nil) > call-interactively(eval-last-sexp) > : > What is false with this command? Maybe you haven't loaded cc-mode yet, so the command isn't defined. Put: (require 'cc-mode) before it. -- 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 ***