Fix "switch mode" to edit current code in new mode when compatible.
Merge remote-tracking branch 'upstream/master'
Roll back introduction of enum for handleClose param.
Merge pull request #2457 from jdf/master

Switch modes: reopen current sketch in new mode editor if file extension is compatible.