Will Lentz <Will_Lentz@...> writes:
> With the short program below trying to jump to "ENUM_VAL_2" gives the
> semantic-ia-fast-jump: Could not find suitable jump point for
> Note that semantic-complete-jump works fine in this case, but I
> generally like the results of semantic-ia-fast-jump better. Is there a
> way to get semantic-ia-fast-jump to work with enums?
As you have noticed, these two jump-functions work
differently. semantic-ia-fast-jump first analyzes the current context
and then tries to derive the correct symbol based on
that. semantic-complete-jump however does a 'brutish' search for the
symbol, which is why it usually finds the symbols, but also those which
do not fit in the current context.
It seems the context analysis does not parse enum-symbols at the moment.
> If not, is there a way to locally define a new command that tries
> semantic-ia-fast-jump first but falls back to semantic-complete-jump
> if that fails?
This function should do what you want:
(defun DE-semantic-universal-jump-function ()
(let* ((ctxt (semantic-analyze-current-context))
(tag (and ctxt (reverse (oref ctxt prefix)))))
(if (semantic-tag-p (car-safe tag))
If the current context returns a proper tag, it will use s-ia-fast-jump,