> I think changing this line of code
> from  (list (cons "import[ ]+\\(.*\\)[ ]*;" 'backward)
> to (list (cons "^import[ ]+\\(.*\\)[ ]*;" 'backward)
> should do the trick for most cases. 

This assumes that the import statement starts at the beginning of line.
Granted that is the case most of the time. However for cases like -

/**/ import java.awt.*; /*
import java.awt.Component;
import java.awt.Container;
import java.awt.Font;
import java.awt.Window;
//*/

it wont. I use the above to achive quick switching between
import-on-demand and specific-import (inserting a slash
at the beginning of first line does the trick).

I think Senator/Semantic should be used if we want to solve
this most precisely. I do not have a clue though how to do it
...sorry.

-sandip

Reply via email to