Upgrade text-buffer and atom-keymap for grim upgrade