fix two small bugs in autoedit, and handle (,) like {;}