Thanks for your answers.
I've just checked out the code from CVS and it is neat. If you'd like
I could take a shot at adding the addtional features from my code and
creating a patch for semantic-fold.el.
On Fri, 18 Feb 2005 22:27:23 -0500, Eric M. Ludlam
> 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
> 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'll take a look. Btw, if you set the 'reveal-toggle-invisible
property on 'semantic-fold you can make the fringe bitmaps when if the
tag is opened by reveal-mode.
> 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.
> >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.
What I'm trying to do is quite simple. Currently, if I unfold a tag,
make some edits inside and then move outside it, then the next time
the idle-timer kicks in and the tag is reparsed, it gets folded again.
What I'd like is that it remember the fact that I unfolded the tag and
not fold it. The simplest way to do this would be to somehow not clear
the decorations on the tag at all, since any edits would not require
them to be changed. Perhaps the <decoration-style>-highlight-default
function could get called only for new tags, while something like
<decoration-style>-update-after-edits could get called when the tag is
But I don't know much about semantic internals, so this might not make
sense. In that case I just can store the fold state as an attribute
on the tag overlay or somewhere else.
> Lastly, you might want to run `M-x checkdoc' on your code to make your
> doc-strings RMS compatible.
Thanks, I didn't know such a thing exsisted!