edit ag-mode