Hi,

  That is quite nifty.  I wrote one also which is in CEDET CVS only
right now, but yours is much niftier.  I like the "highlight" that is
the line down the side.  That is a nice effect.  The pre-existing
function `semantic-momentary-unhighlight-tag' could do well to emulate
it.

  In CEDET cvs, you will find new utility functions to make folding
easier, including `semantic-set-tag-folded' which works well with
isearch.  That is in CVS in semantic-decorate.el.

  I my version, if I click on the little + or - in the fringe too
much, my Emacs would crash, so I didn't persue it very far as I still
need to produce a good bug report.

>>> Suraj Acharya <[EMAIL PROTECTED]> seems to think that:
>I've been working on a semantic-decoration style which allows tags to
>be folded and unfolded, and uses fringe bitmaps to indicate where the
>tags are.
>
>http://www.emacswiki.org/elisp/semantic-tag-folding.el
>
>>From the commentary :
>
  [ ... ]
>
>Eric,  I have a couple of questions about semantic-decorate-mode:
>
>1)  The definition of semantic-decoration-styles seems to be missing a
>:require attribute for semantic-decorate-mode. Currently, if I try to
>customize its value, after starting up emacs I end with each style
>listed twice in semantic-decoration-styles.

That variable maintains itself.  To fix that I probably need a second
variable that is customized, that the first references as new items
are auto-added.  I'll have to look into that.

>2) I need to add a keybinding for clicking on the fringe for this
>mode, it would be nice if there was key map for
>semantic-decoration-mode.

If you look at semantic-fold.el from CVS, you will see how I
accomplished that task with a semantic-folding-mode of its own.  I
tend to create lots of modes for all the features to make them easy to
turn on and off without tromping other obscure features.

>3) What is a good way to enable semantic-decoration-mode by default ? I tried
>(add-hook 'jde-mode-hook 'semantic-decoration-mode) but it complains
>"Buffer Foo.java was not set up for parsing".

If you look in the INSTALL, you will see there are several startup
functions, and one is `(semantic-load-enable-code-helpers)' which
happens to have decoration mode enabled by default.

For any semantic mode, there is a `global-' version.  If you use that,
it will auto-add itself to any semantic enabled mode.

Semantic modes need to be added to `semantic-init-hooks'.  This hook
is run after the major-mode hook, which is why the buffer is not yet
setup for parsing.

>4) Once semantic-decoration-mode is up and running and all the tags
>have been decorated, if I make any edits in a tag it looks like all
>the decorations for the tag are deleted and it is sent to the
>highlight-default function again. Is there any way for the function to
>be called with the old decorations intact so it can remove them only
>if it wants to ?
  [ ... ]

I'm not quite sure what you mean.  Are you trying to prevent a folded
tag from being decorated by other decoration modes?  That could be
tricky as you probably want to keep some, but disable others.

Some decoration modes purposely do not decorate short functions, such
as boundary mode.  Perhaps they should just be made savvy toward tags
that are artificially shortened.  The detection of this in a generic
way may be challenging.

Lastly, you might want to run `M-x checkdoc' on your code to make your
doc-strings RMS compatible.

Your code is nifty!  Thanks.
Eric

-- 
          Eric Ludlam:                 [EMAIL PROTECTED], [EMAIL PROTECTED]
   Home: http://www.ludlam.net            Siege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net               GNU: www.gnu.org

Reply via email to