[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: c-style-alist

From: PJ Weisberg
Subject: Re: c-style-alist
Date: Wed, 29 Sep 2010 15:02:17 -0700

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 ()
>>  (when (and (or (file-exists-p "omnetpp.ini")
>>                 (search-forward "<omnetpp.h>"))
>>             (not changing-to-omnet))
>>    (setq changing-to-omnet t)
>>    (cpp-omnet-mode)
>>    (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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]