En 25/09/12 02:28, Eric M. Ludlam escribiu:
> On 09/20/2012 01:44 PM, Sergio Villar Senin wrote:
>> The problem is that semantic refuses to analize the files opened with
>> that new derived mode and issues this error "Cannot analize buffers not
>> supported by Semantic".
>> I read somewhere that Semantic does not work with derived sources. Is
>> that true? If not, what else do I need to get it properly working?
> I recently did this for Arduino mode, and the support code looks like this:
> (define-child-mode arduino-mode c++-mode
> "`arduino-mode' uses the same parser as `c++-mode'.")
> then you need to add this to semantic-new-buffer-setup-functions
> (arduino-mode . semantic-default-c-setup)
thx for the answer. I finally made it work using a different approach
but your email inspired me a lot. I finally fixed it by just adding
(add-hook 'mynewmode-hook 'semantic-default-c-setup)
as simple as that.