Re: [cedet-semantic] type information
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2008-01-03 02:22:18
|
Hi Nikolaj (and others). I was going back through old mail and discovered I had never replied or done anything with your code. I don't remember what I was up to last June, but apparently I was busy. My apologies. I have checked in an adaptation of your change that works with the "formatter" argument. Hopefully this does what you originally intended. Thanks Eric >>> Nikolaj Schumacher <n_s...@we...> seems to think that: >"Eric M. Ludlam" <er...@si...> wrote: > >>>>> "Alessandro Piras" <la...@gm...> seems to think that: >>>It doesn't display type information about the function's arguments >>>though. Is there a way to get it display that information? It would be >>>great indeed.. >> >> If you want to give it a try, update >> `semantic--format-tag-arguments' to allow for full type info. >> Arguments from various languages could be strings, lists of >> who-knows-what, or tags, so it can be a bit tricky. ;) > >Or just use the one I wrote a few weeks ago. :) >It should work for all C-based languages. (Any notes appreciated.) > > >(defun semantic--format-tag-arguments (args formatter color) > "Format the argument list ARGS with FORMATTER. >FORMATTER is a function used to format a tag. >COLOR specifies if color should be used." > (let ((out nil)) > (while args > (push (if (semantic-tag-p (car args)) > (unless (equal (semantic-tag-type (car args)) "void") > (semantic-format-tag-prototype (car args) nil color)) > (semantic-format-tag-name-from-anything (car args) nil color > 'variable)) > out) > (setq args (cdr args))) > (mapconcat 'identity (nreverse out) semantic-function-argument-separator) > )) > > >regards, >Nikolaj Schumacher [ ... ] -- Eric Ludlam: za...@gn..., er...@si... Home: http://www.ludlam.net Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net GNU: www.gnu.org |