Re: [CEDET-devel] small patch for semantic-complete-self-insert command
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2009-02-12 02:41:05
|
>>> Alex Ott <al...@gm...> seems to think that: >Hello all > >The attached small patch implements one feature - it allows to select which >function will used for displaying list of completions, when >semantic-complete-self-insert is called. By default it use same function, >as previous - semantic-complete-analyze-inline, but if you'll set variable >semantic-self-insert-show-completion-function to > >(lambda () (semantic-ia-complete-symbol-menu (point))) > >then you'll get pretty looking graphical menu instead of separate buffer ;-) [...] > (self-insert-command arg) > (when (and (= arg 1) >- (semantic-analyze-current-context)) >- (semantic-complete-analyze-inline) >+ (semantic-analyze-current-context)) >+ (funcall semantic-self-insert-show-completion-function) > )) Hi Alex, Thanks for the patch! The function semantic-complete-analyze-inline can be configured to show a tooltip, or other completion entry by configuring semantic-complete-inline-analyzer-displayor-class to choose a method for showing completions. This does not, as it happens, have a popup menu option. While significantly more complex to implement than your patch, having a menu based "displayor" class would then enable the many other completion tools to have another cool option in addition to just the semantic-complete-self-insert. There are some other tools out there that have nicer completion display mechanisms. It would be nice to add such options to this tool, or to just adopt one of these other tools as the UI to the Semantic completion engine. If you are specifically looking for a popup-menu to keyboard-nav through when pressing ".", I think I'd rather see a different command just for that, and it could live in semantic-ia.el next to the configuration you were using. It's doc could then mention that it won't work well under X, where you can't navigate the menu if you compile Emacs with the wrong toolkit. Actually, I'm not sure if there is a toolkit that allows it on X. This confusing opinion is due to the historical growth of the different completion APIs that have been written over the years. It will be a big project, but I'd like to refactor the miscellaneous user-facing commands spread around under semantic, srecode, ede, etc into a single CEDET user-facing API. At the moment all the little tools in Semantic or Srecode compete and makes CEDET appear "HUGE", even though at a basic level it isn't that complex. Eric -- Eric Ludlam: er...@si... Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net |