Re: [CEDET-devel] CEDET and Matlab
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2008-05-16 16:17:06
|
>>> David <de...@ar...> seems to think that: >"Eric M. Ludlam" <er...@si...> writes: >> Thanks for reminding me that I had fixes for that. I checked them >> in. > >Thanks. It still didn't really work for me since >semantic-matlab-match-function-re assumes that return values are in >square brackets, which I usually omit if there's only one return >value. I changed it to > > "\\(^\\s-*function\\b[ \t\n.]*\\)\\(.*=\\|\\)\\s-*\\(\\sw+\\)\\>" > >which seems to cover at least the following function definitions: > >function [a,b] = test1(foo,bar) >function [a] = test2(foo) >function a = test3(foo) >function a = test4 >function test5(foo) >function test6 Hi, Thats for the test. I updated the regexp to handle your listed cases, but to also disallow some items, where .* was too general. >I still cannot get completion to work across different files though, but >I guess this is somehow a configuration error on my part? I don't use >EDE for now but simply set semanticdb-project-roots to the directory >containing my Matlab files. I can complete functions which are defined >in the currently visited buffer, but not from functions in the other >files. The MATLAB support right now is only for basic parsing for tags. Setting the semanticdb-project-roots to point at your top-level function is the right thing to do. I tried jumping around (with C-c , J .. which is capital J) and it found tags across files for me. You won't be able to get any of the smart completion to work, because MATLAB is not a typed language, and the MATLAB language support excludes local context parsing. If you look in semantic/bovine/semantic-el.el, you will find it overrides a bunch of methods for local context parsing. It seems likely this will need to be done to start getting the smart completion to work for MATLAB. If you'd like to tackle this problem, I'd be happy to help you out. >BTW, I also get the following error due to the default value of >semanticdb-default-save-directory: > >(file-error "Opening output file" "no such file or directory" >"/home/david/.semanticdb/!home!david!testcedet!semantic.cache"): >/home/david/.semanticdb/!home!david!testcedet!semantic.cache > >Not sure if this is just to let me know that the tags are saved >elsewhere, but I created ~/.semanticdb now, just to be sure. Hmmm. I was under the impression this would be made for you, but I see now it is not. I'll put that on my todo list. [ ... ] >> I have quite a bit I need to do for the Matlab support in Emacs in >> general, such as dealing with the new object system, but that is tied >> to my work, as opposed to my home project which is CEDET, and I'm >> pretty busy when I'm at work these days. (I work at The MathWorks in >> Natick.) > >I haven't looked at the new object system yet since I'm still using >Matlab 7.4. I'm working a lot with the current object system with the >awkward @-directories, which I guess isn't really parseable? However, I The dir structure isn't parsable, but it is certainly navigable. There are routines that could be overloaded for MATLAB to do a directory search instead of parser output search for that sort of thing. I'd be happy to help you through that as needed. Eric -- Eric Ludlam: er...@si... Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net |