refactor agda-mode.coffee