semantic-analyze-possible-completion

Martin Stein <[email protected]> Wed, 28 Jan 2015 23:30:02 +0100
Newsgroups gmane.emacs.cedet
Message-ID <[email protected]>
Hi,

I got somehow lost trying to figure out how to get completion to work 
with my fortran parser.
A typical example looks like:

module mod

use some_module

contains

   subroutine sub(arg)
   ...
   end subroutine

...

end module


Accordingly there is one big tag of class 'module, containing in its 
attributes all the information, in particular there is a 'subroutine tag 
of name "sub" buried in :members. Now if I type "call s" I expect that 
sub is found, but it is not.

If I want to have a function name completed in C code, relevant 
functions are found as top level tags (as there is no encompassing 
module-like structure), hence (semantic-analyze-find-tags-by-prefix 
completetext) in line 192 of analyze/complete.el finds the proper tag.

I know that semantic-analyze-possible-completions does the work and is 
overloadable. Should I overload this function? It seems that the code 
structure outlined above does not fit its inner workings, which is 
designed for C. On the other hand this function is overloaded only for 
some corner-cases (clang, part of grammar).
Do I miss something and that routine should still work for fortran, e.g. 
by overloading some buried helper functions? For example, the relevant 
tags are contained in the context object. But it does not seem to be 
queried for those tags? (At least not in my small C example I tested).


Another question:
What do I need to do to include tags from other modules (included via 
"use some_module" as in the example above)? I could not find 
documentation (or hints in other language files) for that.

Martin


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/