From: Berndl, K. <kla...@sd...> - 2002-10-23 14:41:02
|
>The key function is how to detect if semantic is active: >(defsubst semantic-active-p () > "Return non-nil if the current buffer was set up for parsing." > semantic-toplevel-bovine-table) >which is very simple. The key is to understand why it is non nil. ECB uses this function in it's hook of `semantic-after-toplevel-cache-change-hook' in the following way: (or updated-cache (not (semantic-active-p))) whereas updated-cache is the argument semantic-after-toplevel-cache-change-hook Calles it's functions with. This condition enables clearing out the method-buffer of ECB if the Hook is called with a nil cache for a not-semantic-setup buffer. ==> semantic-active-p returns correctly nil for text-, tex- etc.. buffers. ==> The question is to understand why 'semantic-after-toplevel-cache-change-hook' Is called for not-semantic-buffers??!! If i remember right, Eric, we have discussed a long time ago this point, if this is a bug or a feature that these hooks are also called for not-semantic-buffers with a nil cache. I can't remember exactly but i believe you have removed this behavior for a while but after that you have reactivated it again for some senseful reasons (which i can't remember)...but as already said, it's a long time ago... ;-) Thoughts? Klaus >I will not be able to investigate further till after my pumpkin throwing contest in early >November. |