[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Wed, 29 Sep 2010 15:02:17 -0700
On Wed, Sep 29, 2010 at 5:40 AM, Andrea Crotti
> 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)
>> (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?