From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: PJ Weisberg Newsgroups: gmane.emacs.help Subject: Re: c-style-alist Date: Wed, 29 Sep 2010 15:02:17 -0700 Message-ID: References: <4C9E00FF.9040105@easy-emacs.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1285797776 23663 80.91.229.12 (29 Sep 2010 22:02:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 29 Sep 2010 22:02:56 +0000 (UTC) To: Andrea Crotti , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 30 00:02:54 2010 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.69) (envelope-from ) id 1P14jh-00089U-Tu for geh-help-gnu-emacs@m.gmane.org; Thu, 30 Sep 2010 00:02:50 +0200 Original-Received: from localhost ([127.0.0.1]:45802 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P14jh-0005xt-Cg for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Sep 2010 18:02:49 -0400 Original-Received: from [140.186.70.92] (port=56957 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P14jH-0005xo-Hz for Help-gnu-emacs@gnu.org; Wed, 29 Sep 2010 18:02:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P14jG-0001dl-Eb for Help-gnu-emacs@gnu.org; Wed, 29 Sep 2010 18:02:23 -0400 Original-Received: from p3plsmtpa01-09.prod.phx3.secureserver.net ([72.167.82.89]:49304) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1P14jG-0001dX-5T for Help-gnu-emacs@gnu.org; Wed, 29 Sep 2010 18:02:22 -0400 Original-Received: (qmail 9332 invoked from network); 29 Sep 2010 22:02:18 -0000 Original-Received: from unknown (74.125.83.41) by p3plsmtpa01-09.prod.phx3.secureserver.net (72.167.82.89) with ESMTP; 29 Sep 2010 22:02:18 -0000 Original-Received: by gwj16 with SMTP id 16so608528gwj.0 for ; Wed, 29 Sep 2010 15:02:17 -0700 (PDT) Original-Received: by 10.42.174.138 with SMTP id v10mr299505icz.97.1285797737628; Wed, 29 Sep 2010 15:02:17 -0700 (PDT) Original-Received: by 10.42.5.138 with HTTP; Wed, 29 Sep 2010 15:02:17 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:75037 Archived-At: On Wed, Sep 29, 2010 at 5:40 AM, Andrea Crotti wrote: > > Il giorno 28/set/2010, alle ore 18.26, PJ Weisberg ha scritto >> >> The or is short-circuiting, but problem is with calling >> cpp-omnet-mode, not search-forward. >> >> I was thinking something like this: >> >> (add-hook 'c++-mode-hook 'is-omnet-cpp-file) >> (make-variable-buffer-local 'changing-to-omnet) >> >> (defun is-omnet-cpp-file () >> =A0(when (and (or (file-exists-p "omnetpp.ini") >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (search-forward "")) >> =A0 =A0 =A0 =A0 =A0 =A0 (not changing-to-omnet)) >> =A0 =A0(setq changing-to-omnet t) >> =A0 =A0(cpp-omnet-mode) >> =A0 =A0(setq changing-to-omnet nil))) > > Thanks, but I don't see it on the list I think you only sent to me... > Unfortunately still doesn't work, the same infinite loop problem, even > if this time I really think it was working, very weird! Hm. With that code I don't think it can be calling cpp-omnet-mode from is-omnet-cpp-file before it's returned from the previous call to cpp-omnet-mode from is-omnet-cpp file. What list of function calls do you get with the error?