"David Ponce" <[EMAIL PROTECTED]> writes:

 > Attached is a new version of senator with a minor change to
 > `senator-next-token' and `senator-previous-token' to return the token at
 >  point.  Useful when calling these commands non-interactively.
 > 
 > The following advices `beginning-of-defun' and `end-of-defun' to use the
 >  SEmantic NAvigaTOR if semantic tokens are available and called 
 > interactively.

Many thanks - this now does just what I want.  I've also bound the following to
M-C-h in Java mode to mark Java functions:

  (defun jsc-mark-java-fun ()
  "Put mark at end of this Java function, point at beginning."
    (interactive)
    (forward-char)
    (call-interactively 'beginning-of-defun)
    (beginning-of-line)
    (push-mark nil t t)
    (call-interactively 'end-of-defun)
    (forward-char)
  )

... I don't know if this can also be better done with defadvice, but it seems
to work!?

    --- John

Reply via email to