>>> John Cooper <[EMAIL PROTECTED]> seems to think that:
>"David Ponce" <[EMAIL PROTECTED]> writes:
>
> > Here is a new version of SEmantic NAvigaTOR with improved navigation in
> > semantic token where to step at start and end.
> >
> > - `senator-next-token' move the point to the end of token if it was at
> > beginning or in the middle of the token.
> >
> > - `senator-previous-token' move the point to the beginning of token if
> > it was at end or in the middle of the token.
>
>Thanks, that's definitely better.
>
>Now, would it be possible to have senator-next-token never take me to the
>beginning of a function and have senator-previous-token never take me to the
>end of a function? Then it would work just like {beginning,end}-of-defun in C
>and Elisp buffers.
[ ... ]
Dave & John,
You might be able to do something like this which would make
beginning,end defun work with semantic tokens when available.
Note: I didn't test this code, just typed it in here:
(defadvice beginning-of-defun (around senator activate)
"If semantic tokens are available, use them to navigate."
(if (and (featurep 'semantic) semantic-toplevel-bovine-cache)
(senator-previous-token)
ad-do-it))
This would magically make the traditional keys work properly for
non-traditional uses (like java).
Enjoy
Eric
--
|\/\/\___/\/\/| Eric Ludlam [EMAIL PROTECTED]; [EMAIL PROTECTED]
\____ o o ____/ Homepage: http://www.ultranet.com/~zappo
) ( Trebuchets: http://www.ultranet.com/~zappo/trebuchet.shtml
( * * ) GNU: http://www.gnu.org
\___/ Trevor Shea Ludlam: Oct 16th, 1999, 5lbs 11oz 18in