document cursor_context function