Pete Beardmore writes:
> Another hack to ease message buffer congestion. Placing the point after a
> symbol with no further postfix matches (i.e. elisp buffer, rando ->
> random ..successful completion, then next time event around the error will
Thanks for catching that. I've never used
semantic-idle-local-symbol-highlight-mode, that's why I never noticed
> The error occur at line 922 of semantic-idle.el, a call to 'semantic-symref-
> hits-in-region' with an arg 'tag' that is seemingly always nil. The tiny patch
> below avoids the call. Incidentally, digging into that function and then
> finding 'semantic-find-tag-by-overlay' ..this always returns nil, whatever
> symbol i place the point next to, despite dozens of the same symbols being
> available in the buffer for highlighting. Maybe the functionality isn't what i
> thought though.
It fails when there is no current tag at (point), which I figure is
pretty common while editing Emacs Lisp code.
> I had to resort to 'emacs debug' to find this, is there any chance someone
> could list the steps they would have taken to use edebug to drop into the code
> at 'define-semantic-idle-service semantic-idle-local-symbol-highlight' (line
> 966) please?
> Line 901 'define-semantic-idle-service semantic-idle-local-symbol-
> highlight' ..is what? a special form called via the 'func' section of the
> expanded defmacro at line 698?! how do i get at that??
First of all, you can use M-x semantic-debug-idle-function to get a
backtrace for the error, which doesn't tell you terribly much in this
But I'm not sure what you're asking for. Do you want to use edebug-defun
on the definition of `semantic-idle-local-symbol-highlight'? For using
edebug on macros, you have to tell it how it should handle the
arguments; I've now included such a specification.
Or do you mean that when you use `describe-function' on
semantic-idle-local-symbol-highlight-idle-function, Emacs cannot find
the definition in the file? There's really no silver bullet for that;
when you define functions at run-time through macros, you have to sleuth
through the code. Usually, I would have used 'occur' on something like
'local-symbol-highlight' and then see where I might get something. But I
agree this can easily get tedious.
Anyway, I've applied your patch. Thanks again!