updated for main-line and flymake support