bug fixes

- buf-ws-save is fixed to process closed entries correctly
- major-mode field updating is fixed
- entry registration is improved